Data clustering method, device, computer equipment and storage medium
By using the association mining strategy and the initial clustering processing of the face image area inside the vehicle in the vehicle, the data clustering accuracy problem caused by low face clarity in the vehicle driving image is solved, and more accurate monitoring of vehicle driving trajectory.
Patent Information
- Application Number
- CN202210383320.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2042-04-12
AI Technical Summary
In vehicle driving monitoring scenarios, due to vehicle driving speed, weather or window color, the vehicle driving image may not contain human faces or have low face clarity, resulting in low accuracy of data clustering and unavailability to obtain completeness images with low clarity are prone to clustering results of vehicle driving images corresponding to different faces.
By obtaining the vehicle's internal face image area in the vehicle driving data, the relationship between the target vehicle driving data and the reference vehicle driving data is explored based on the preset correlation mining strategy, and through the correlation relationship and the initial The clustering results are target clustering processed, and data with the greatest similarity or license plate matching are selected as the center of mass, and the clustering results are merged to improve accuracy.
It improves the accuracy of data clustering, avoids clustering errors caused by low clarity in the face image area, ensures complete driving trajectory monitoring of the same face, and enhances the reliability of vehicle driving monitoring.
Smart Images

Figure CN114743038B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data clustering method, apparatus, computer equipment and storage medium. Background Art
[0002] With the continuous development of technology, more and more devices can perform clustering processing on data. For example, for face images, the same or similar face images are clustered into one category.
[0003] In the vehicle driving monitoring scenario, the vehicle driving image may not contain the image area where the face is located, or the clarity of the image area where the face is located may be low due to reasons such as the vehicle driving speed, weather or window color. Therefore, when data clustering is performed on the vehicle driving image with respect to the image area where the face is located in the vehicle driving image, only the vehicle driving images containing the image area where the face is located can be clustered, and the complete driving trajectory cannot be obtained for the same face, resulting in a high difficulty in vehicle driving monitoring. At the same time, when data clustering is performed on vehicle driving images with low clarity, it is easy for one clustering result to contain vehicle driving images corresponding to different faces.
[0004] It can be seen that under the relevant technology, the accuracy of data clustering is low. Summary of the invention
[0005] The embodiments of the present application provide a data clustering method, apparatus, computer device and storage medium to solve the problem of low accuracy of data clustering.
[0006] In a first aspect, a data clustering method is provided, comprising:
[0007] Acquire each first clustering result, wherein each first clustering result is obtained by performing initial clustering processing on each target vehicle driving data based on a face image region where a face located inside the vehicle is located in a vehicle driving image contained in each target vehicle driving data generated within a preset time period, and each first clustering result contains at least one target vehicle driving data;
[0008] Based on a preset association mining strategy, the target vehicle driving data and the reference vehicle driving data generated within the preset time period are mined to obtain a plurality of associations between the target vehicle driving data and the reference vehicle driving data, wherein the license plate data contained in each of the reference vehicle driving data matches the license plate data contained in each of the target vehicle driving data;
[0009] Based on the multiple association relationships and the first clustering results, target clustering processing is performed on the target vehicle driving data to obtain at least one target clustering result.
[0010] Optionally, before mining the target vehicle driving data and the reference vehicle driving data generated within the preset time period based on a preset association mining strategy to obtain multiple associations between the target vehicle driving data and the reference vehicle driving data, the method further includes:
[0011] Acquire license plate data corresponding to a vehicle image region containing a human face in a vehicle driving image contained in each of the target vehicle driving data;
[0012] For the license plate data contained in each of the target vehicle driving data, the license plate data corresponding to the vehicle image area in the vehicle driving image contained in the real-time vehicle driving data generated within the preset time period is selected, and the real-time vehicle driving data that is the same as the license plate data contained in the corresponding target vehicle driving data is selected as the reference vehicle driving data.
[0013] Optionally, the target vehicle driving data and the reference vehicle driving data further include data generation time and data generation address respectively;
[0014] The method of mining the target vehicle driving data and the reference vehicle driving data generated within the preset time period based on the preset association relationship mining strategy to obtain multiple association relationships between the target vehicle driving data and the reference vehicle driving data includes:
[0015] The target vehicle driving data and the reference vehicle driving data are respectively used as comprehensive vehicle driving data, and the comprehensive vehicle driving data are grouped based on the license plate data and the time interval to which the data is generated, and a plurality of vehicle driving data sequences are obtained for each license plate data, wherein the comprehensive vehicle driving data contained in each vehicle driving data sequence are arranged according to the data generation time;
[0016] For multiple vehicle driving data sequences corresponding to each license plate data, perform the following operations:
[0017] Adopting the association mining strategy, based on the data generation address of the comprehensive vehicle driving data contained in each vehicle driving data sequence, the corresponding multiple vehicle driving data sequences are respectively mined to determine at least one frequent item and the frequency of the data generation address of the comprehensive vehicle driving data contained in each frequent item appearing in the corresponding multiple vehicle driving data groups, wherein:
[0018] The frequent item includes at least one comprehensive vehicle driving data;
[0019] The obtained at least one frequent item and the corresponding frequency are used as the association relationship corresponding to the corresponding license plate data.
[0020] Optionally, based on the multiple association relationships and the first clustering results, target clustering processing is performed on the driving data of each target vehicle to obtain at least one target clustering result, including:
[0021] Based on the license plate data of each target vehicle driving data, the first clustering results are reintegrated to obtain a plurality of second clustering results, wherein the license plate data of each target vehicle driving data in each second clustering result is the same, and the faces located inside the vehicles in the vehicle driving images match;
[0022] Based on the multiple association relationships and the respective second clustering results, target clustering processing is performed on the respective target vehicle driving data to obtain at least one target clustering result.
[0023] Optionally, based on the multiple association relationships and the respective second clustering results, target clustering processing is performed on the driving data of the respective target vehicles to obtain at least one target clustering result, including:
[0024] For each of the second clustering results, respectively select the target vehicle driving data with the greatest similarity to the cluster centroid of the corresponding second clustering result from the target vehicle driving data included in the second clustering result as the centroid vehicle driving data corresponding to the corresponding second clustering result;
[0025] Based on the multiple association relationships, determining the target similarity between every two centroid vehicle driving data;
[0026] The second clustering results corresponding to each of the two centroid vehicle driving data whose target similarity is greater than a preset similarity condition are merged to obtain at least one target clustering result.
[0027] Optionally, the target vehicle driving data further includes a driving identification, the driving identification is used to characterize the relative position relationship between a face image region including a face located inside the vehicle and a vehicle image region in a vehicle driving image included in the target vehicle driving data, the driving identification includes a main driving identification and a co-driving identification;
[0028] For each of the second clustering results, the target vehicle driving data having the greatest similarity with the cluster centroid of the corresponding second clustering result is selected from the target vehicle driving data included in the second clustering result as the centroid vehicle driving data corresponding to the corresponding second clustering result, including:
[0029] For each of the second clustering results, the following operations are performed respectively:
[0030] From the target vehicle driving data included in the second clustering result, respectively determine the target vehicle driving data including the driving identification as the primary driving identification and the target vehicle driving data including the driving identification as the secondary driving identification;
[0031] From the target vehicle driving data including the main driving identification, select the target vehicle driving data with the greatest similarity to the cluster centroid of the corresponding second clustering result as the main centroid vehicle driving data;
[0032] From the target vehicle driving data including the co-pilot identification, select the target vehicle driving data with the greatest similarity to the cluster centroid of the corresponding second clustering result as the co-centroid vehicle driving data;
[0033] Based on the obtained main centroid vehicle driving data and the secondary centroid vehicle driving data, the centroid vehicle driving data corresponding to the second clustering result is obtained.
[0034] Optionally, each association relationship corresponds to a license plate data, each association relationship includes at least one frequent item, each frequent item includes at least one target vehicle driving data or reference vehicle driving data, the frequent item has a frequency, the frequency represents the data generation address corresponding to the frequent item, and the number of occurrences in the target vehicle driving data and the reference vehicle driving data belonging to the same time interval with the same license plate data and data generation time;
[0035] The determining, based on the multiple association relationships, the target similarity between each two centroid vehicle driving data includes:
[0036] For every two executions of vehicle driving data, perform the following operations:
[0037] Determine the initial similarity between the two centroid vehicle driving data based on the similarity between the face image regions including the face of a person located inside the vehicle in the target vehicle driving image respectively included in the two centroid vehicle driving data;
[0038] Determine the stretching coefficients corresponding to the two centroid vehicle driving data based on whether the data generation moments respectively included in the two centroid vehicle driving data belong to the same time interval and the frequencies of the frequent items respectively included in the two centroid vehicle driving data;
[0039] Based on the stretching coefficient, the initial similarity is stretched to obtain the target similarity between the two centroid vehicle driving data.
[0040] Optionally, the frequent item includes a frequent item one and a frequent item two, the target vehicle driving data and the reference vehicle driving data included in the frequent item one have the same data generation address, and the target vehicle driving data and the reference vehicle driving data included in the frequent item two have two different data generation addresses;
[0041] The step of determining the stretching coefficients corresponding to the two centroid vehicle driving data based on whether the data generation moments respectively included in the two centroid vehicle driving data belong to the same time interval and the frequencies of the frequent items respectively included in the two centroid vehicle driving data comprises:
[0042] If the data generation time of the two centroid vehicle driving data belongs to the same time interval, and the two centroid vehicle driving data belong to the same frequent binomial, then the ratio of the frequency of the frequent binomial in which the two centroid vehicle driving data are located to the sum of the frequencies of the frequent binomial in which each centroid vehicle driving data is located is used as the stretching coefficient corresponding to the two centroid vehicle driving data;
[0043] If the generation times of the two centroid vehicle driving data do not belong to the same time interval, and the two centroid vehicle driving data belong to the same frequent item, the ratio between the frequency of the frequent item in which the two centroid vehicle driving data are located and the sum of the frequencies of the frequent items in which the target vehicle driving data and the reference vehicle driving data respectively belong to each of the frequent items in which the centroid vehicle driving data are located is used as the stretching coefficient corresponding to the two centroid vehicle driving data;
[0044] If the generation times of the two centroid vehicle driving data do not belong to the same time interval, and the two centroid vehicle driving data do not belong to the same frequent item one or the same frequent item two, the preset specified value will be used as the stretching coefficient corresponding to the two centroid vehicle driving data.
[0045] In a second aspect, a data aggregation device is provided, comprising:
[0046] An acquisition module: used to acquire each first clustering result, wherein each first clustering result is obtained by performing initial clustering processing on each target vehicle driving data based on a face image region where a face located inside the vehicle is located in a vehicle driving image contained in each target vehicle driving data generated within a preset time period, and each first clustering result contains at least one target vehicle driving data;
[0047] Processing module: used for mining and processing the target vehicle driving data and the reference vehicle driving data generated within the preset time period based on a preset association mining strategy, to obtain multiple associations between the target vehicle driving data and the reference vehicle driving data, wherein the license plate data contained in each of the reference vehicle driving data matches the license plate data contained in each of the target vehicle driving data;
[0048] The processing module is further used to: perform target clustering processing on the target vehicle driving data based on the multiple association relationships and the respective first clustering results to obtain at least one target clustering result.
[0049] Optionally, the processing module is further used for:
[0050] Before mining and processing the target vehicle driving data and the reference vehicle driving data generated within the preset time period based on a preset association mining strategy to obtain a plurality of associations between the target vehicle driving data and the reference vehicle driving data, obtaining license plate data corresponding to a vehicle image region containing a human face in a vehicle driving image contained in each of the target vehicle driving data;
[0051] For the license plate data contained in each of the target vehicle driving data, the license plate data corresponding to the vehicle image area in the vehicle driving image contained in the real-time vehicle driving data generated within the preset time period is selected, and the real-time vehicle driving data that is the same as the license plate data contained in the corresponding target vehicle driving data is selected as the reference vehicle driving data.
[0052] Optionally, the target vehicle driving data and the reference vehicle driving data further include data generation time and data generation address respectively; the processing module is specifically used for:
[0053] The method of mining the target vehicle driving data and the reference vehicle driving data generated within the preset time period based on the preset association relationship mining strategy to obtain multiple association relationships between the target vehicle driving data and the reference vehicle driving data includes:
[0054] The target vehicle driving data and the reference vehicle driving data are respectively used as comprehensive vehicle driving data, and the comprehensive vehicle driving data are grouped based on the license plate data and the time interval to which the data is generated, and a plurality of vehicle driving data sequences are obtained for each license plate data, wherein the comprehensive vehicle driving data contained in each vehicle driving data sequence are arranged according to the data generation time;
[0055] For multiple vehicle driving data sequences corresponding to each license plate data, perform the following operations:
[0056] Adopting the association mining strategy, based on the data generation address of the comprehensive vehicle driving data contained in each vehicle driving data sequence, the corresponding multiple vehicle driving data sequences are respectively mined to determine at least one frequent item and the frequency of the data generation address of the comprehensive vehicle driving data contained in each frequent item appearing in the corresponding multiple vehicle driving data groups, wherein:
[0057] The frequent item includes at least one comprehensive vehicle driving data;
[0058] The obtained at least one frequent item and the corresponding frequency are used as the association relationship corresponding to the corresponding license plate data.
[0059] Optionally, the processing module is specifically used for:
[0060] Based on the license plate data of each target vehicle driving data, the first clustering results are reintegrated to obtain a plurality of second clustering results, wherein the license plate data of each target vehicle driving data in each second clustering result is the same, and the faces located inside the vehicles in the vehicle driving images match;
[0061] Based on the multiple association relationships and the respective second clustering results, target clustering processing is performed on the respective target vehicle driving data to obtain at least one target clustering result.
[0062] Optionally, the processing module is specifically used for:
[0063] For each of the second clustering results, respectively select the target vehicle driving data with the greatest similarity to the cluster centroid of the corresponding second clustering result from the target vehicle driving data included in the second clustering result as the centroid vehicle driving data corresponding to the corresponding second clustering result;
[0064] Based on the multiple association relationships, determining the target similarity between every two centroid vehicle driving data;
[0065] The second clustering results corresponding to each of the two centroid vehicle driving data whose target similarity is greater than a preset similarity condition are merged to obtain at least one target clustering result.
[0066] Optionally, the target vehicle driving data further includes a driving identification, the driving identification is used to characterize the relative position relationship between a face image region including a face located inside the vehicle and a vehicle image region in a vehicle driving image included in the target vehicle driving data, the driving identification includes a main driving identification and a co-driving identification; the processing module is specifically used to:
[0067] For each of the second clustering results, the following operations are performed respectively:
[0068] From the target vehicle driving data included in the second clustering result, respectively determine the target vehicle driving data including the driving identification as the primary driving identification and the target vehicle driving data including the driving identification as the secondary driving identification;
[0069] From the target vehicle driving data including the main driving identification, select the target vehicle driving data with the greatest similarity to the cluster centroid of the corresponding second clustering result as the main centroid vehicle driving data;
[0070] From the target vehicle driving data including the co-pilot identification, select the target vehicle driving data with the greatest similarity to the cluster centroid of the corresponding second clustering result as the co-centroid vehicle driving data;
[0071] Based on the obtained main centroid vehicle driving data and the secondary centroid vehicle driving data, the centroid vehicle driving data corresponding to the second clustering result is obtained.
[0072] Optionally, each association relationship corresponds to a license plate data, each association relationship includes at least one frequent item, each frequent item includes at least one target vehicle driving data or reference vehicle driving data, the frequent item has a frequency, the frequency represents the data generation address corresponding to the frequent item, and the number of occurrences in the target vehicle driving data and the reference vehicle driving data belonging to the same time interval under the same license plate data and data generation time; the processing module is specifically used for:
[0073] For every two executions of vehicle driving data, perform the following operations:
[0074] Determine the initial similarity between the two centroid vehicle driving data based on the similarity between the face image regions including the face of a person located inside the vehicle in the target vehicle driving image respectively included in the two centroid vehicle driving data;
[0075] Determine the stretching coefficients corresponding to the two centroid vehicle driving data based on whether the data generation moments respectively included in the two centroid vehicle driving data belong to the same time interval and the frequencies of the frequent items respectively included in the two centroid vehicle driving data;
[0076] Based on the stretching coefficient, the initial similarity is stretched to obtain the target similarity between the two centroid vehicle driving data.
[0077] Optionally, the frequent item includes a frequent item one and a frequent item two, the target vehicle driving data and the reference vehicle driving data included in the frequent item one have the same data generation address, and the target vehicle driving data and the reference vehicle driving data included in the frequent item two have two different data generation addresses; the processing module is specifically used to:
[0078] If the data generation time of the two centroid vehicle driving data belongs to the same time interval, and the two centroid vehicle driving data belong to the same frequent binomial, then the ratio of the frequency of the frequent binomial in which the two centroid vehicle driving data are located to the sum of the frequencies of the frequent binomial in which each centroid vehicle driving data is located is used as the stretching coefficient corresponding to the two centroid vehicle driving data;
[0079] If the generation times of the two centroid vehicle driving data do not belong to the same time interval, and the two centroid vehicle driving data belong to the same frequent item, the ratio between the frequency of the frequent item in which the two centroid vehicle driving data are located and the sum of the frequencies of the frequent items in which the target vehicle driving data and the reference vehicle driving data respectively belong to each of the frequent items in which the centroid vehicle driving data are located is used as the stretching coefficient corresponding to the two centroid vehicle driving data;
[0080] If the generation times of the two centroid vehicle driving data do not belong to the same time interval, and the two centroid vehicle driving data do not belong to the same frequent item one or the same frequent item two, the preset specified value will be used as the stretching coefficient corresponding to the two centroid vehicle driving data.
[0081] According to a third aspect, a computer program product is provided, comprising a computer program, which implements the method according to the first aspect when executed by a processor.
[0082] According to a fourth aspect, a computer device is provided, comprising:
[0083] A memory for storing program instructions;
[0084] The processor is used to call the program instructions stored in the memory and execute the method as described in the first aspect according to the obtained program instructions.
[0085] According to a fifth aspect, a computer-readable storage medium is provided, wherein the storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method described in the first aspect.
[0086] In the embodiment of the present application, after obtaining each first clustering result for each target vehicle driving data, each target vehicle driving data and each reference vehicle driving data related to each target vehicle driving data can be mined based on the association mining test to obtain multiple associations between the target vehicle driving data and the reference vehicle driving data, thereby clustering the target vehicle driving data again based on the obtained multiple associations and each first clustering result to obtain at least one target clustering result. By using the reference vehicle driving data related to each target vehicle driving data as the basis for clustering the target vehicle driving data, it is avoided that when clustering is performed only on the face image area where the face located inside the vehicle is located in the vehicle driving image contained in each target vehicle driving data, the clustering result error caused by the low clarity of the face image area is avoided, thereby improving the accuracy of data clustering. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 An application scenario of the data clustering method provided in the embodiment of the present application;
[0088] Figure 2 A schematic diagram of a process flow of a data clustering method provided in an embodiment of the present application;
[0089] Figure 3 A schematic diagram of the principle of the data clustering method provided in the embodiment of the present application Figure 1 ;
[0090] Figure 4 A schematic diagram of the principle of the data clustering method provided in the embodiment of the present application Figure 2 ;
[0091] Figure 5 A structural diagram of a data clustering device provided in an embodiment of the present application Figure 1 ;
[0092] Figure 6 A structural diagram of a data clustering device provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0093] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0094] Some of the terms used in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
[0095] (1) Association mining strategy:
[0096] Association mining strategies are mainly used to discover interesting associations or connections between item sets in large amounts of data. A typical example of association mining strategies is shopping basket analysis, which analyzes customers' purchasing habits by discovering the connections between different items placed in their shopping baskets. By understanding which items are frequently purchased by customers at the same time, it can help retailers develop reasonable marketing strategies. Commonly used methods include: Apriori and FP-growth algorithms, PrefixSpan algorithm, etc. Common parameters include: confidence, support, lift, etc.
[0097] It should be noted that in the embodiments of the present application, when the user data involved is applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0098] The following is a brief introduction to the application fields of the data clustering method provided in the embodiments of the present application.
[0099] With the continuous development of technology, more and more devices can perform clustering processing on data. For example, for face images, the same or similar face images are clustered into one category.
[0100] In the vehicle driving monitoring scenario, the vehicle driving image may not contain the image area where the face is located, or the clarity of the image area where the face is located may be low due to reasons such as the vehicle driving speed, weather or window color. Therefore, when data clustering is performed on the vehicle driving image with respect to the image area where the face is located in the vehicle driving image, only the vehicle driving images containing the image area where the face is located can be clustered, and the complete driving trajectory cannot be obtained for the same face, resulting in a high difficulty in vehicle driving monitoring. At the same time, when data clustering is performed on vehicle driving images with low clarity, it is easy for one clustering result to contain vehicle driving images corresponding to different faces.
[0101] It can be seen that under the relevant technology, the accuracy of data clustering is low.
[0102] In order to solve the problem of low accuracy of data clustering, the present application proposes a data clustering method. In the method, after obtaining each first clustering result, each target vehicle driving data and each reference vehicle driving data generated within a preset time period can be mined and processed based on a preset association mining strategy to obtain multiple associations between the target vehicle driving data and the reference vehicle driving data. After obtaining multiple associations, target clustering processing can be performed on the target vehicle driving data based on the multiple associations and each first clustering result to obtain at least one target clustering result.
[0103] Among them, each first clustering result is obtained by performing initial clustering processing on each target vehicle driving data based on the facial image area where the human face located inside the vehicle is located in the vehicle driving image contained in each target vehicle driving data generated within a preset time period. Each first clustering result contains at least one target vehicle driving data, and the license plate data contained in each reference vehicle driving data matches the license plate data contained in each target vehicle driving data.
[0104] In the embodiment of the present application, after obtaining each first clustering result for each target vehicle driving data, each target vehicle driving data and each reference vehicle driving data related to each target vehicle driving data can be mined based on the association mining test to obtain multiple associations between the target vehicle driving data and the reference vehicle driving data, thereby clustering the target vehicle driving data again based on the obtained multiple associations and each first clustering result to obtain at least one target clustering result. By using the reference vehicle driving data related to each target vehicle driving data as the basis for clustering the target vehicle driving data, it is avoided that when clustering is performed only on the face image area where the face located inside the vehicle is located in the vehicle driving image contained in each target vehicle driving data, the clustering result error caused by the low clarity of the face image area is avoided, thereby improving the accuracy of data clustering.
[0105] The following is an explanation of the application scenarios of the data clustering method provided in this application.
[0106] Please refer to Figure 1 , which is a schematic diagram of an application scenario of the data clustering method provided in the present application. The application scenario includes a client 101 and a server 102. The client 101 and the server 102 can communicate with each other. The communication method can be to communicate using wired communication technology, such as communicating by connecting a network cable or a serial port cable; or to communicate using wireless communication technology, such as communicating through Bluetooth or wireless fidelity (WIFI) and other technologies, without specific limitation.
[0107] The client 101 generally refers to a device that can provide driving data of each target vehicle and driving data of each reference vehicle, such as a terminal device, a third-party application that can be accessed by the terminal device, or a web page that can be accessed by the terminal device. Terminal devices include but are not limited to mobile phones, computers, intelligent transportation devices, smart appliances, etc. The server 102 generally refers to a device that can perform clustering processing on the driving data of each target vehicle, such as a terminal device or a server. The server includes but is not limited to a cloud server, a local server, or an associated third-party server. Both the client 101 and the server 102 can use cloud computing to reduce the occupation of local computing resources; cloud storage can also be used to reduce the occupation of local storage resources.
[0108] As an embodiment, the client 101 and the server 102 may be the same device, and there is no specific limitation. In the embodiment of the present application, the client 101 and the server 102 are different devices as an example for introduction.
[0109] The following is based on Figure 1 , the data clustering method provided in the embodiment of the present application is specifically introduced. Please refer to Figure 2 , which is a flow chart of the data clustering method provided in an embodiment of the present application.
[0110] S201, obtaining each first clustering result.
[0111] The server can receive the driving data of each target vehicle based on each client, for example, receiving the driving data of each target vehicle sent by the monitoring equipment installed on each road; the server can read the driving data of each target vehicle stored in the memory, etc., without specific restrictions.
[0112] The target vehicle driving data may include a vehicle driving image taken while the vehicle is driving. In the vehicle driving image, the area containing the vehicle is the vehicle image area, and the area where the face inside the vehicle is located is the face image area; the target vehicle driving data may also include the time when the vehicle was photographed, that is, the time when the vehicle driving image was generated; the target vehicle driving data may also include the location where the vehicle was photographed, which may be a physical location or the network address of the shooting device, etc.; the target vehicle driving data may also include the vehicle license plate data, which may include the license plate number, license plate color, etc., or the image area where the license plate is located, etc.; the target vehicle driving data may also include the type, brand, color, etc. of the vehicle; the target vehicle driving data may also include face attribute data, which mainly includes but is not limited to the width and height of the face image area, and the clarity of the face image area, etc., which may be used to filter whether it meets the basis for serving as the target vehicle driving data, etc. There is no specific restriction on the data included in the target vehicle driving data.
[0113] The vehicle driving image in the target vehicle driving data may be an image obtained after eliminating the pedestrian image area, that is, the image area where the faces of people not located inside the vehicle are located is eliminated, etc., and there is no specific limitation.
[0114] The server can perform initial clustering processing on each target vehicle driving data obtained within each preset time period based on the facial image area where the face located inside the vehicle is located in the vehicle driving image contained in each target vehicle driving data, and obtain each first clustering result, each first clustering result containing at least one target vehicle driving data. In at least one target vehicle driving data contained in a first clustering result, the similarity between the facial image areas in the vehicle driving images contained in each two target vehicle driving data satisfies the facial similarity condition. The server can also directly receive each first clustering result sent by other devices, and the other devices complete the initial clustering processing, etc., without specific limitation.
[0115] Since the vehicle driving image is a snapshot image, the image clarity is low, and since the shooting angles of various shooting devices may be different, the target vehicle driving data corresponding to the vehicle driving image containing the same face may be clustered into different first clustering results in each first clustering result obtained through the preliminary clustering process, making the accuracy of the first clustering result low. Therefore, the server can continue to execute S202 and S203 to obtain a more accurate target clustering result.
[0116] S202, based on a preset association relationship mining strategy, mining and processing are performed on each target vehicle driving data and each reference vehicle driving data generated within a preset time period to obtain multiple association relationships between the target vehicle driving data and the reference vehicle driving data.
[0117] After obtaining each first clustering result, the server can obtain each reference vehicle driving data generated within a preset time period, and the preset time period is the same as the preset time period for generating each target vehicle driving data. The server can use each reference vehicle driving data other than each target vehicle driving data as a reference basis for clustering each target vehicle driving data, and cluster each target vehicle driving data from multiple perspectives to improve the accuracy of data clustering. The reference vehicle driving data may include the time when the vehicle driving image was taken, the location where the image was taken, the license plate data, the vehicle color, the vehicle type, etc. The content contained in the reference vehicle driving data may be the same as the content contained in the target vehicle driving data except for the face image area. The reference vehicle driving data may not contain the face image area, or may contain a face image area with very low clarity, so that the reference vehicle driving data cannot be clustered as the target vehicle driving data.
[0118] As an embodiment, the license plate data contained in each reference vehicle driving data obtained by the server may be data that matches the license plate data contained in each target vehicle driving data. The match may be that the license plate data corresponds to the same, or that the similarity between the license plate data is greater than a license plate similarity threshold, etc., and there is no specific limitation. By obtaining each reference vehicle driving data that matches the license plate data contained, it is ensured that each reference vehicle driving data is related to each target vehicle driving data, so that the accuracy of clustering the target vehicle driving data can be improved based on each reference vehicle driving data.
[0119] The server can obtain the license plate data corresponding to the vehicle image area containing the face in the vehicle driving image contained in each target vehicle driving data. For the license plate data contained in each target vehicle driving data, the license plate data corresponding to the vehicle image area in the vehicle driving image contained in each real-time vehicle driving data generated within a preset time period is selected, and the real-time vehicle driving data that is the same as the license plate data contained in the corresponding target vehicle driving data is used as the reference vehicle driving data. The real-time vehicle driving data can be all the vehicle driving data that can be obtained by the server, and the license plate data that meets the requirements is selected as the reference vehicle driving data.
[0120] For example, after the server obtains the driving data of each target vehicle in the past 30 days and performs initial clustering, based on the license plate data contained in the driving data of each target vehicle, the server can obtain all the vehicle driving data, that is, all the real-time vehicle driving data, and select reference vehicle driving data generated in the past 30 days and containing the same license plate data.
[0121] As an embodiment, in order to avoid repeatedly selecting the same reference vehicle driving data, after obtaining the license plate data contained in each target vehicle driving data, the license plate data can be deduplicated to remove duplicate license plate data and avoid repeated traversal process.
[0122] After obtaining the driving data of each reference vehicle, the server can mine each target vehicle driving data and each reference vehicle driving data based on a preset association mining strategy to obtain multiple associations between the target vehicle driving data and the reference vehicle driving data. The association can, for example, represent the relationship of the same driving trajectory, or the relationship of the same starting point and the same destination, etc., without specific limitation.
[0123] As an embodiment, the target vehicle driving data and the reference vehicle driving data also include a data generation time and a data generation address, respectively. The data generation time may be the time when the target vehicle driving data or the reference vehicle driving data is generated, and the time when the vehicle driving image is captured may be used as the data generation time of the target vehicle driving data or the reference vehicle driving data, etc. The data generation address may be a physical address where the target vehicle driving data or the reference vehicle driving data is generated, such as a street, intersection, etc., or it may be a MAC address or IP address of a shooting device that captures the vehicle driving image, etc., without specific limitation.
[0124] The server can take each target vehicle driving data and each reference vehicle driving data as comprehensive vehicle driving data, and group and process each comprehensive vehicle driving data based on the license plate data contained therein and the time interval to which the data was generated. For each license plate data, multiple vehicle driving data sequences are obtained, and the comprehensive vehicle driving data contained in each vehicle driving data sequence are arranged according to the time when the data was generated.
[0125] For example, the driving data of each target vehicle and each reference vehicle are data obtained by the server within the last 30 days, so the time interval to which the data is generated can be an interval in days. For example, the last 30 days are from October 1 to October 30, and the data is generated on October 1, so the time interval to which the data is generated can be recorded as the first day, etc.
[0126] The license plate data can be obtained by performing target recognition on the vehicle image area containing the face when obtaining the vehicle driving image, or it can be obtained by performing image segmentation on the license plate area in the vehicle image area containing the face when obtaining the vehicle driving image, etc., without specific limitation.
[0127] The server can group the comprehensive vehicle driving data that contain the same license plate data and the data generation time belongs to the same time interval into one group, and arrange the data in the order from the past to the present in the group of comprehensive vehicle driving data to obtain a vehicle driving data sequence. Therefore, each license plate data can correspond to multiple vehicle driving data sequences. The following takes the multiple vehicle driving data sequences corresponding to one license plate data as an example for introduction, and the multiple vehicle driving data sequences corresponding to other license plate data are not repeated here.
[0128] Adopting the association mining strategy, based on the data generation address of the comprehensive vehicle driving data contained in each vehicle driving data sequence, the corresponding multiple vehicle driving data sequences are respectively mined and processed to determine at least one frequent item, and the frequency of the data generation address of the comprehensive vehicle driving data contained in each frequent item in the corresponding multiple vehicle driving data groups, wherein the frequent item contains at least one comprehensive vehicle driving data. The server can use the obtained at least one frequent item and the corresponding frequency as the association relationship corresponding to the corresponding license plate data.
[0129] For example, see Figure 3 , multiple vehicle driving data sequences corresponding to the same license plate data include a first vehicle driving data sequence including a vehicle driving data group A, a vehicle driving data group B and a vehicle driving data group C, wherein each vehicle driving data contained in the vehicle driving data group A has at least the same license plate data, the same data generation address and belongs to the same time interval, and the vehicle driving data group A indicates that the data generation address of each vehicle driving data contained therein is A, and similarly, in the vehicle driving data group B, the vehicle driving data group C, the vehicle driving data group D, the vehicle driving data group E and the vehicle driving data group F, each vehicle driving data contained therein has at least the same license plate data, the same data generation address and belongs to the same time interval, and the data generation addresses of each vehicle driving data contained therein are B, C, D, E and F respectively.
[0130] The second vehicle driving data sequence includes vehicle driving data group A, vehicle driving data group C, vehicle driving data group B, vehicle driving data group A and vehicle driving data group B; the third vehicle driving data sequence includes vehicle driving data group A, vehicle driving data group B and vehicle driving data group E; the fourth vehicle driving data sequence includes vehicle driving data group F.
[0131] Then, please refer to Figure 4 , multiple frequent items can be obtained, including a frequent one item for vehicle driving data group A, a frequent two items for vehicle driving data group A and vehicle driving data group C, a frequent two items for vehicle driving data group A and vehicle driving data group B, a frequent one item for vehicle driving data group B, and a frequent one item for vehicle driving data group C. The frequency of the frequent one item for vehicle driving data group A is 3, the frequency of the frequent two items for vehicle driving data group A and vehicle driving data group C is 2, the frequency of the frequent two items for vehicle driving data group A and vehicle driving data group B is 3, the frequency of the frequent one item for vehicle driving data group B is 3, and the frequency of the frequent one item for vehicle driving data group C is 2.
[0132] As an embodiment, if target vehicle driving data exists in vehicle driving data group A, vehicle driving data group B, vehicle driving data group C, vehicle driving data group D, vehicle driving data group E and vehicle driving data group F, it can be represented by a face recognition.
[0133] As an embodiment, the server may obtain the corresponding frequent items for each driving trajectory by setting the minimum support, for example, setting the minimum support to be greater than or equal to 2.
[0134] As an embodiment, the server can also group and process each comprehensive vehicle driving data based on the license plate data, the time interval to which the data is generated, and the driving identification. The driving identification is used to characterize the relative position relationship between the face image area containing the face of the person located inside the vehicle and the vehicle image area in the vehicle driving image contained in the target vehicle driving data. The driving identification includes the main driving identification and the co-driving identification. For reference vehicle driving data that does not contain a face, it can be added as the main driving identification, or it can be determined based on the driving identification contained in the target vehicle driving data at the time of adjacent data generation corresponding to the same license plate data, etc., without specific restrictions. The server then obtains multiple vehicle driving data sequences for each license plate data, and the comprehensive vehicle driving data contained in each vehicle driving data sequence are arranged according to the time when the data was generated.
[0135] For example, the comprehensive vehicle driving data A is license plate data A, main driver identification, October 1, and data generation address 1; the comprehensive vehicle driving data B is license plate data A, main driver identification, October 1, and data generation address 2; the comprehensive vehicle driving data C is license plate data A, main driver identification, October 2, and data generation address 1; the comprehensive vehicle driving data D is license plate data A, co-driver identification, October 1, and data generation address 1.
[0136] The server divides the comprehensive vehicle driving data with the same license plate data, the data generation time belonging to the same day, and the same driving identification into one group, so that the comprehensive vehicle driving data A and the comprehensive vehicle driving data B are one group, the comprehensive vehicle driving data C is one group, and the comprehensive vehicle driving data D is one group. The comprehensive vehicle driving data in each group are sorted according to the data generation time, and for the license plate data A, a vehicle driving data sequence can be obtained, which includes the comprehensive vehicle driving data A and the comprehensive vehicle driving data B, a vehicle driving data sequence including the comprehensive vehicle driving data C, and a vehicle driving data sequence including the comprehensive vehicle driving data D.
[0137] S203: Based on the multiple association relationships and each first clustering result, target clustering processing is performed on the target vehicle driving data to obtain at least one target clustering result.
[0138] After obtaining the multiple association relationships and the first clustering results, the server may perform target clustering processing on the target vehicle driving data based on the multiple association relationships and the first clustering results to obtain at least one target clustering result.
[0139] As an embodiment, since the definition of the face image area contained in the vehicle driving image is usually low, during the initial clustering process, only the target vehicle driving data corresponding to the very similar face image area can be clustered into one category. However, in some cases, such as the front face and the side face are not very similar, but they do belong to the same person. If the target vehicle driving data corresponding to the front face and the side face are clustered into two different categories, the clustering result will be inaccurate. At the same time, the same face may appear in different vehicles. Therefore, the clustering result based on face clustering may include target vehicle driving data corresponding to multiple vehicle data. The clustering result has low accuracy, which is not conducive to subsequent tasks such as analysis of driving trajectories.
[0140] Therefore, after obtaining each first clustering result, the server can re-integrate each first clustering result based on the license plate data of each target vehicle driving data to obtain multiple second clustering results, so that the license plate data of each target vehicle driving data in each second clustering result is the same, and the faces located inside the vehicle in the vehicle driving image match. The server then performs target clustering processing on each target vehicle driving data based on multiple associations and each second clustering result to obtain at least one target clustering result.
[0141] The first clustering results may be reintegrated by merging multiple first clustering results into one second clustering result; or merging some target vehicle driving data in multiple first clustering results; or splitting one first clustering result into two second clustering results, etc., without specific limitation.
[0142] The face matching inside the vehicle in the vehicle driving image can be that the similarity between the face image areas is greater than a preset threshold, which is considered a match, or the similarity between the face image areas is sorted from large to small, and the one ranked before a specified sequence number is considered a match, etc., without specific limitation.
[0143] As an embodiment, after obtaining each second clustering result, the cluster center of each second clustering result can be obtained. Since the cluster center is data whose similarity with each target vehicle driving data contained in the corresponding second clustering result satisfies a preset similarity condition, the cluster center may be one of the target vehicle driving data, or may not be the target vehicle driving data. For each second clustering result, the server can select the target vehicle driving data with the greatest similarity with the cluster centroid of the corresponding second clustering result from the target vehicle driving data contained in the second clustering result, as the centroid vehicle driving data corresponding to the corresponding second clustering result. Thereby, the cluster center of each second clustering result is adjusted to one target vehicle driving data. The server can then determine the target similarity between each two centroid vehicle driving data based on multiple association relationships. The second clustering results corresponding to each two centroid vehicle driving data whose target similarity is greater than the preset similarity condition are merged to obtain at least one target clustering result.
[0144] As an embodiment, if the target vehicle driving data includes a driving identification, then for each second clustering result, a main centroid vehicle driving data corresponding to a main driving identification and a secondary execution vehicle driving data corresponding to a secondary driving identification can be determined. One second clustering result is used as an example for introduction, and other second clustering results are similar and will not be repeated here.
[0145] The server can determine the target vehicle driving data whose driving identification is the main driving identification and the target vehicle driving data whose driving identification is the co-pilot identification from the target vehicle driving data included in the second clustering result. From the target vehicle driving data including the main driving identification, the target vehicle driving data with the greatest similarity to the clustering centroid of the corresponding second clustering result is selected as the main centroid vehicle driving data. From the target vehicle driving data including the co-pilot identification, the target vehicle driving data with the greatest similarity to the clustering centroid of the corresponding second clustering result is selected as the sub-centroid vehicle driving data. Finally, the server can obtain the centroid vehicle driving data corresponding to the second clustering result based on the main centroid vehicle driving data and the sub-centroid vehicle driving data obtained. When the server calculates the centroid vehicle driving data, it can be calculated based on the main centroid vehicle driving data and the sub-centroid vehicle driving data contained therein, or it can be calculated only based on the main centroid vehicle driving data contained therein, etc., without specific limitation.
[0146] As an embodiment, each association relationship corresponds to a license plate data, each association relationship includes at least one frequent item, each frequent item contains at least one target vehicle driving data or reference vehicle driving data, the frequent item has a frequency, the frequency represents the data generation address corresponding to the frequent item, the number of occurrences in the target vehicle driving data and the reference vehicle driving data belonging to the same time interval with the same license plate data and data generation time, then when the server determines the target similarity between each two centroid vehicle driving data based on multiple association relationships, it can be calculated based on the frequent items and the corresponding frequencies. The following is an introduction taking two centroid vehicle driving data as an example, the calculation process of other centroid vehicle driving data is similar, and will not be repeated here.
[0147] The server can determine the initial similarity between the two centroid vehicle driving data based on the similarity between the face image regions containing the face located inside the vehicle in the target vehicle driving images respectively contained in the two centroid vehicle driving data. Determine the stretching coefficients corresponding to the two centroid vehicle driving data based on whether the data generation moments respectively contained in the two centroid vehicle driving data belong to the same time interval and the frequencies of the frequent items respectively contained in the two centroid vehicle driving data. Based on the stretching coefficient, the initial similarity is stretched to obtain the target similarity between the two centroid vehicle driving data.
[0148] As an embodiment, the frequent items may include a frequent item one and a frequent item two. The target vehicle driving data and the reference vehicle driving data included in the frequent item one have the same data generation address, and the target vehicle driving data and the reference vehicle driving data included in the frequent item two have two different data generation addresses. When the server determines that the data generation times of the two centroid vehicle driving data belong to the same time interval and the two centroid vehicle driving data belong to the same frequent item two, the server may use the ratio of the frequency of the frequent item two in which the two centroid vehicle driving data exist to the sum of the frequencies of the frequent items in which each centroid vehicle driving data exists as the stretching coefficient corresponding to the two centroid vehicle driving data.
[0149] When the server determines that the generation times of the two centroid vehicle driving data do not belong to the same time interval and the two centroid vehicle driving data belong to the same frequent item, the server can use the ratio of the frequency of the frequent item in which the two centroid vehicle driving data are located and the sum of the frequencies of the frequent items in which the target vehicle driving data and the reference vehicle driving data are located respectively included in the frequent binarization where each centroid vehicle driving data is located as the stretching coefficient corresponding to the two centroid vehicle driving data.
[0150] When the server determines that the generation times of the two centroid vehicle driving data do not belong to the same time interval and the two centroid vehicle driving data do not belong to the same frequent item one or the same frequent item two, the server can use the preset specified value as the stretching coefficient corresponding to the two centroid vehicle driving data.
[0151] For example, the initial similarity between the driving data of two centroid vehicles is S original , pre-set a stretching amplitude S bias , through the stretch coefficient C adj , the stretching amplitude S can be adjusted dynamically bias , so that the server can be based on the stretch factor C adj and stretching amplitude S bias The product of the initial similarity is S original The sum of the two centroid vehicle driving data determines the target similarity S adj , please refer to formula (1).
[0152] S adj =S original +C adj ×S bias (1)
[0153] For example, please refer to Figure 3 and Figure 4 , taking the frequent binomial as vehicle driving data group A and vehicle driving data group C as an example, the data generation time of vehicle driving data group A and vehicle driving data group C belongs to the same day and is in the same frequent binomial, then the frequency corresponding to the frequent binomial containing vehicle driving data group A and the frequency corresponding to the frequent binomial containing vehicle driving data group C can be determined, and the sum of the frequencies is recorded as n a|c , and determine the frequency of the frequent binomial that contains both vehicle driving data group A and vehicle driving data group C as n a&c , then the server can As the stretching coefficient corresponding to the vehicle driving data of the two centroids.
[0154] Taking the vehicle driving data group A in two vehicle driving data sequences as an example, the data generation time of the vehicle driving data group A in the two vehicle driving data sequences belongs to different time intervals, and the vehicle driving data group A in the two vehicle driving data sequences belongs to the frequent items respectively. Then, the frequent binaries containing the vehicle driving data group A can be determined, which are the vehicle driving data group A and the vehicle driving data group C, and the vehicle driving data group A and the vehicle driving data group B. The two frequent binaries correspond to three frequent items, which respectively include the vehicle driving data group A, the vehicle driving data group B, and the vehicle driving data group C. The server can determine that the frequent item is the frequency of the vehicle driving data group A, the frequent item is the frequency of the vehicle driving data group B, and the frequent item is the sum of the frequency of the vehicle driving data group C, recorded as where n i The value of i is different, n i The frequency of different frequent items is represented by i, and the value of i is [1,M]. When there are three frequent items, the value of i is [1,3]. The server records the frequency of the frequent item A of the vehicle driving data as n one ,based on Determine the stretch factor corresponding to the two centroid vehicle driving data.
[0155] For situations other than the above two situations, the server may use a preset designated value of 0 as the stretching coefficient corresponding to the two centroid vehicle driving data.
[0156] As an embodiment, when distinguishing between the main driving logo and the co-driver logo, the stretching coefficient corresponding to the co-driver logo can be set to be smaller than the stretching coefficient corresponding to the main driving logo, and the stretching amplitude corresponding to the co-driver logo can be set to be smaller than the stretching amplitude corresponding to the main driving logo. For example, the stretching amplitude corresponding to the co-driver logo is 0.1-0.15, and the stretching amplitude corresponding to the main driving logo is 0.5-0.1, etc.
[0157] Based on the same inventive concept, the present application embodiment provides a data clustering device that can implement the functions corresponding to the aforementioned data clustering method. Figure 5 , the device includes an acquisition module 501 and a processing module 502, wherein:
[0158] Acquisition module 501: used to acquire each first clustering result, wherein each first clustering result is obtained by performing initial clustering processing on each target vehicle driving data based on the face image area where the face located inside the vehicle is located in the vehicle driving image contained in each target vehicle driving data generated within a preset time period, and each first clustering result contains at least one target vehicle driving data;
[0159] Processing module 502: for performing mining processing on each target vehicle driving data and each reference vehicle driving data generated within a preset time period based on a preset association mining strategy, to obtain multiple associations between the target vehicle driving data and the reference vehicle driving data, wherein the license plate data contained in each reference vehicle driving data is matched with the license plate data contained in each target vehicle driving data;
[0160] The processing module 502 is further used to: perform target clustering processing on the target vehicle driving data based on the multiple association relationships and each first clustering result to obtain at least one target clustering result.
[0161] In a possible embodiment, the processing module 502 is further configured to:
[0162] Before mining and processing each target vehicle driving data and each reference vehicle driving data generated within a preset time period based on a preset association mining strategy to obtain multiple associations between the target vehicle driving data and the reference vehicle driving data, obtaining license plate data corresponding to a vehicle image region containing a human face in a vehicle driving image contained in each target vehicle driving data;
[0163] For the license plate data contained in each target vehicle driving data, the license plate data corresponding to the vehicle image area in the vehicle driving image contained in the real-time vehicle driving data generated within a preset time period is selected, and the real-time vehicle driving data that is the same as the license plate data contained in the corresponding target vehicle driving data is selected as the reference vehicle driving data.
[0164] In a possible embodiment, the target vehicle driving data and the reference vehicle driving data further include the data generation time and the data generation address respectively; the processing module 502 is specifically used for:
[0165] Based on the preset association mining strategy, each target vehicle driving data and each reference vehicle driving data generated within a preset time period are mined and processed to obtain multiple associations between the target vehicle driving data and the reference vehicle driving data, including:
[0166] Each target vehicle driving data and each reference vehicle driving data are respectively used as comprehensive vehicle driving data, and each comprehensive vehicle driving data is grouped and processed based on the license plate data contained therein and the time interval to which the data is generated, and for each license plate data, a plurality of vehicle driving data sequences are obtained, wherein each comprehensive vehicle driving data contained in each vehicle driving data sequence is arranged according to the data generation time;
[0167] For multiple vehicle driving data sequences corresponding to each license plate data, perform the following operations:
[0168] Adopting the association mining strategy, based on the data generation address of the comprehensive vehicle driving data contained in each vehicle driving data sequence, respectively mining the corresponding multiple vehicle driving data sequences, determining at least one frequent item, and the frequency of the data generation address of the comprehensive vehicle driving data contained in each frequent item appearing in the corresponding multiple vehicle driving data groups, wherein the frequent item contains at least one comprehensive vehicle driving data;
[0169] The obtained at least one frequent item and the corresponding frequency are used as the association relationship corresponding to the corresponding license plate data.
[0170] In a possible embodiment, the processing module 502 is specifically configured to:
[0171] Based on the license plate data of each target vehicle driving data, each first clustering result is reintegrated to obtain a plurality of second clustering results, wherein the license plate data of each target vehicle driving data in each second clustering result is the same, and the faces located inside the vehicles in the vehicle driving images are matched;
[0172] Based on the multiple association relationships and each second clustering result, target clustering processing is performed on each target vehicle driving data to obtain at least one target clustering result.
[0173] In a possible embodiment, the processing module 502 is specifically configured to:
[0174] For each second clustering result, the target vehicle driving data having the greatest similarity to the cluster centroid of the corresponding second clustering result is selected from the target vehicle driving data included in the second clustering result as the centroid vehicle driving data corresponding to the corresponding second clustering result;
[0175] Based on multiple association relationships, determine the target similarity between every two centroid vehicle driving data;
[0176] The second clustering results corresponding to each of the two centroid vehicle driving data whose target similarity is greater than a preset similarity condition are merged to obtain at least one target clustering result.
[0177] In a possible embodiment, the target vehicle driving data further includes a driving identification, which is used to characterize the relative position relationship between a face image region including a face located inside the vehicle and a vehicle image region in a vehicle driving image included in the target vehicle driving data, and the driving identification includes a main driving identification and a co-driving identification; the processing module 502 is specifically used to:
[0178] For each second clustering result, perform the following operations:
[0179] From the target vehicle driving data included in the second clustering result, respectively determine the target vehicle driving data including the driving identification as the primary driving identification and the target vehicle driving data including the driving identification as the secondary driving identification;
[0180] From the target vehicle driving data including the main driving identification, select the target vehicle driving data with the greatest similarity to the cluster centroid of the corresponding second clustering result as the main centroid vehicle driving data;
[0181] From the target vehicle driving data including the co-pilot identification, select the target vehicle driving data with the greatest similarity to the cluster centroid of the corresponding second clustering result as the co-centroid vehicle driving data;
[0182] Based on the obtained main centroid vehicle driving data and secondary centroid vehicle driving data, the centroid vehicle driving data corresponding to the second clustering result is obtained.
[0183] In a possible embodiment, each association relationship corresponds to a license plate data, each association relationship includes at least one frequent item, each frequent item includes at least one target vehicle driving data or reference vehicle driving data, and the frequent item has a frequency, and the frequency represents the data generation address corresponding to the frequent item, and the number of occurrences in the target vehicle driving data and the reference vehicle driving data belonging to the same time interval under the same license plate data and data generation time; the processing module 502 is specifically used for:
[0184] For every two executions of vehicle driving data, perform the following operations:
[0185] Determine the initial similarity between the two centroid vehicle driving data based on the similarity between the face image regions including the face of a person located inside the vehicle in the target vehicle driving image respectively included in the two centroid vehicle driving data;
[0186] Determine the stretching coefficients corresponding to the two centroid vehicle driving data based on whether the data generation moments contained in the two centroid vehicle driving data belong to the same time interval and the frequencies of the frequent items of the two centroid vehicle driving data;
[0187] Based on the stretching coefficient, the initial similarity is stretched to obtain the target similarity between the driving data of the two centroid vehicles.
[0188] In a possible embodiment, the frequent item includes a frequent item one and a frequent item two, the target vehicle driving data and the reference vehicle driving data included in the frequent item one have the same data generation address, and the target vehicle driving data and the reference vehicle driving data included in the frequent item two have two different data generation addresses; the processing module 502 is specifically used to:
[0189] If the data generation time of the two centroid vehicle driving data belongs to the same time interval, and the two centroid vehicle driving data belong to the same frequent binomial, then the ratio of the frequency of the frequent binomial in which the two centroid vehicle driving data are located to the sum of the frequencies of the frequent binomial in which each centroid vehicle driving data is located is used as the stretching coefficient corresponding to the two centroid vehicle driving data;
[0190] If the generation time of the two centroid vehicle driving data do not belong to the same time interval, and the two centroid vehicle driving data belong to the same frequent item, the ratio between the frequency of the frequent item in which the two centroid vehicle driving data are in the same and the sum of the frequencies of the frequent items in which the target vehicle driving data and the reference vehicle driving data included in the frequent binarization of each centroid vehicle driving data are located is used as the stretching coefficient corresponding to the two centroid vehicle driving data;
[0191] If the generation times of the two centroid vehicle driving data do not belong to the same time interval, and the two centroid vehicle driving data do not belong to the same frequent item one or the same frequent item two, the preset specified value will be used as the stretching coefficient corresponding to the two centroid vehicle driving data.
[0192] Please refer to Figure 6 The data clustering device can be run on a computer device 600, and the current version and historical version of the data storage program and the application software corresponding to the data storage program can be installed on the computer device 600, and the computer device 600 includes a processor 680 and a memory 620. In some embodiments, the computer device 600 may include a display unit 640, and the display unit 640 includes a display panel 641 for displaying an interactive operation interface by a user.
[0193] In a possible embodiment, the display panel 641 may be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).
[0194] The processor 680 is used to read the computer program and then execute the method defined by the computer program. For example, the processor 680 reads the data storage program or file, etc., so as to run the data storage program on the computer device 600 and display the corresponding interface on the display unit 640. The processor 680 may include one or more general-purpose processors and may also include one or more DSPs (Digital Signal Processors) to perform related operations to implement the technical solutions provided in the embodiments of the present application.
[0195] The memory 620 generally includes internal memory and external memory, and the internal memory can be a random access memory (RAM), a read-only memory (ROM), and a cache (CACHE), etc. The external memory can be a hard disk, an optical disk, a USB disk, a floppy disk, or a tape drive, etc. The memory 620 is used to store computer programs and other data, and the computer program includes applications corresponding to each client, etc. Other data may include data generated after the operating system or application is run, and the data includes system data (such as configuration parameters of the operating system) and user data. In the embodiment of the present application, program instructions are stored in the memory 620, and the processor 680 executes the program instructions in the memory 620 to implement any of the methods discussed in the previous figure.
[0196] The display unit 640 is used to receive input digital information, character information or contact touch operation / contactless gesture, and generate signal input related to user settings and function control of the computer device 600. Specifically, in the embodiment of the present application, the display unit 640 may include a display panel 641. The display panel 641 is, for example, a touch screen, which can collect user touch operations on or near it (such as operations performed by the user using fingers, stylus, or any other suitable object or accessory on or on the display panel 641), and drive corresponding connection devices according to a pre-set program.
[0197] In a possible embodiment, the display panel 641 may include two parts: a touch detection device and a touch controller. The touch detection device detects the touch position of the player, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 680, and can receive and execute the command sent by the processor 680.
[0198] The display panel 641 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the display unit 640, in some embodiments, the computer device 600 may further include an input unit 630, which may include an image input device 631 and other input devices 632, wherein the other input devices may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.
[0199] In addition to the above, the computer device 600 may also include a power supply 690 for supplying power to other modules, an audio circuit 660, a near field communication module 670, and an RF circuit 610. The computer device 600 may also include one or more sensors 650, such as an acceleration sensor, a light sensor, a pressure sensor, etc. The audio circuit 660 specifically includes a speaker 661 and a microphone 662, etc. For example, the computer device 600 can collect the user's voice through the microphone 662 to perform corresponding operations, etc.
[0200] As an embodiment, the number of the processor 680 may be one or more, and the processor 680 and the memory 620 may be coupled or relatively independently configured.
[0201] As an example, Figure 6 The processor 680 in the embodiment may be used to implement the following Figure 5 The functions of the acquisition module 501 and the processing module 502 in.
[0202] As an example, Figure 6 The processor 680 in can be used to implement the corresponding functions of the server or terminal device discussed above.
[0203] A person skilled in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, etc. Various media that can store program codes.
[0204] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product, for example, through a computer program product, which is stored in a storage medium and includes a number of instructions for a computer device to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0205] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data clustering method, characterized in that: include: Acquire each first clustering result, wherein each first clustering result is obtained by performing initial clustering processing on each target vehicle driving data based on a face image region where a face located inside the vehicle is located in a vehicle driving image contained in each target vehicle driving data generated within a preset time period, and each first clustering result contains at least one target vehicle driving data; Based on a preset association mining strategy, the driving data of each target vehicle and the driving data of each reference vehicle generated within the preset time period are mined and processed to obtain multiple associations between the driving data of the target vehicle and the driving data of the reference vehicle, wherein the license plate data contained in each of the driving data of the reference vehicle matches the license plate data contained in each of the driving data of the target vehicle; the associations include at least one of the following: a relationship representing the same driving trajectory, a relationship representing the same starting point and the same destination; Based on the license plate data of each target vehicle driving data, reintegrate the first clustering results to obtain a plurality of second clustering results; wherein the license plate data of each target vehicle driving data in each second clustering result is the same, and the faces located inside the vehicle in the vehicle driving image match; For the plurality of second clustering results, respectively selecting the target vehicle driving data having the greatest similarity with the cluster centroid of the corresponding second clustering result from the target vehicle driving data included in the second clustering results as the centroid vehicle driving data corresponding to the corresponding second clustering result; Based on each obtained association relationship, determine the target similarity between each two centroid vehicle driving data; The second clustering results corresponding to each of the two centroid vehicle driving data whose target similarity is greater than a preset similarity condition are merged to obtain at least one target clustering result.
2. The method according to claim 1, characterized in that Before mining the target vehicle driving data and the reference vehicle driving data generated within the preset time period based on the preset association mining strategy to obtain multiple associations between the target vehicle driving data and the reference vehicle driving data, the method further includes: Acquire license plate data corresponding to a vehicle image region containing a human face in a vehicle driving image contained in each of the target vehicle driving data; For the license plate data contained in each of the target vehicle driving data, the license plate data corresponding to the vehicle image area in the vehicle driving image contained in the real-time vehicle driving data generated within the preset time period is selected, and the real-time vehicle driving data that is the same as the license plate data contained in the corresponding target vehicle driving data is selected as the reference vehicle driving data.
3. The method according to claim 1, characterized in that The target vehicle driving data and the reference vehicle driving data also include data generation time and data generation address respectively; The method of mining the target vehicle driving data and the reference vehicle driving data generated within the preset time period based on the preset association relationship mining strategy to obtain multiple association relationships between the target vehicle driving data and the reference vehicle driving data includes: The target vehicle driving data and the reference vehicle driving data are respectively used as comprehensive vehicle driving data, and the comprehensive vehicle driving data are grouped based on the license plate data and the time interval to which the data is generated, and a plurality of vehicle driving data sequences are obtained for each license plate data, wherein the comprehensive vehicle driving data contained in each vehicle driving data sequence are arranged according to the data generation time; For multiple vehicle driving data sequences corresponding to each license plate data, perform the following operations: Adopting the association mining strategy, based on the data generation address of the comprehensive vehicle driving data contained in each vehicle driving data sequence, the corresponding multiple vehicle driving data sequences are respectively mined to determine at least one frequent item and the frequency of the data generation address of the comprehensive vehicle driving data contained in each frequent item appearing in the corresponding multiple vehicle driving data groups, wherein: The frequent item includes at least one comprehensive vehicle driving data; The obtained at least one frequent item and the corresponding frequency are used as the association relationship corresponding to the corresponding license plate data.
4. The method according to claim 1, characterized in that: The target vehicle driving data further includes a driving identification, which is used to characterize the relative positional relationship between a face image region including a face located inside the vehicle and a vehicle image region in a vehicle driving image included in the target vehicle driving data, and the driving identification includes a main driving identification and a co-driving identification; The step of selecting, for each of the plurality of second clustering results, target vehicle driving data having the greatest similarity to the cluster centroid of the corresponding second clustering result from the target vehicle driving data included in the second clustering results as the centroid vehicle driving data corresponding to the corresponding second clustering result, includes: For the multiple second clustering results, the following operations are performed respectively: From the target vehicle driving data included in the second clustering result, respectively determine the target vehicle driving data including the driving identification as the primary driving identification and the target vehicle driving data including the driving identification as the secondary driving identification; From the target vehicle driving data including the main driving identification, select the target vehicle driving data with the greatest similarity to the cluster centroid of the corresponding second clustering result as the main centroid vehicle driving data; From the target vehicle driving data including the co-pilot identification, select the target vehicle driving data with the greatest similarity to the cluster centroid of the corresponding second clustering result as the co-centroid vehicle driving data; Based on the obtained main centroid vehicle driving data and the secondary centroid vehicle driving data, the centroid vehicle driving data corresponding to the second clustering result is obtained.
5. The method according to claim 1, characterized in that Each association relationship corresponds to a license plate data, each association relationship includes at least one frequent item, each frequent item includes at least one target vehicle driving data or reference vehicle driving data, the frequent item has a frequency, the frequency represents the data generation address corresponding to the frequent item, the number of occurrences in the target vehicle driving data and the reference vehicle driving data belonging to the same time interval with the same license plate data and data generation time; The determining, based on the multiple association relationships, the target similarity between each two centroid vehicle driving data includes: For every two executions of vehicle driving data, perform the following operations: Determine the initial similarity between the two centroid vehicle driving data based on the similarity between the face image regions including the face of a person located inside the vehicle in the target vehicle driving image respectively included in the two centroid vehicle driving data; Determine the stretching coefficients corresponding to the two centroid vehicle driving data based on whether the data generation moments respectively included in the two centroid vehicle driving data belong to the same time interval and the frequencies of the frequent items respectively included in the two centroid vehicle driving data; Based on the stretching coefficient, the initial similarity is stretched to obtain the target similarity between the two centroid vehicle driving data.
6. The method according to claim 5, characterized in that The frequent items include frequent item one and frequent item two, the target vehicle driving data and reference vehicle driving data included in the frequent item one have the same data generation address, and the target vehicle driving data and reference vehicle driving data included in the frequent item two have two different data generation addresses; The step of determining the stretching coefficients corresponding to the two centroid vehicle driving data based on whether the data generation moments respectively included in the two centroid vehicle driving data belong to the same time interval and the frequencies of the frequent items respectively included in the two centroid vehicle driving data comprises: If the data generation time of the two centroid vehicle driving data belongs to the same time interval, and the two centroid vehicle driving data belong to the same frequent binomial, then the ratio of the frequency of the frequent binomial in which the two centroid vehicle driving data are located to the sum of the frequencies of the frequent binomial in which each centroid vehicle driving data is located is used as the stretching coefficient corresponding to the two centroid vehicle driving data; If the generation times of the two centroid vehicle driving data do not belong to the same time interval, and the two centroid vehicle driving data belong to the same frequent item, the ratio between the frequency of the frequent item in which the two centroid vehicle driving data are located and the sum of the frequencies of the frequent items in which the target vehicle driving data and the reference vehicle driving data respectively belong to each of the frequent items in which the centroid vehicle driving data are located is used as the stretching coefficient corresponding to the two centroid vehicle driving data; If the generation times of the two centroid vehicle driving data do not belong to the same time interval, and the two centroid vehicle driving data do not belong to the same frequent item one or the same frequent item two, the preset specified value will be used as the stretching coefficient corresponding to the two centroid vehicle driving data.
7. A data clustering device, characterized in that: include: An acquisition module: used to acquire each first clustering result, wherein each first clustering result is obtained by performing initial clustering processing on each target vehicle driving data based on a face image region where a face located inside the vehicle is located in a vehicle driving image contained in each target vehicle driving data generated within a preset time period, and each first clustering result contains at least one target vehicle driving data; Processing module: used for mining and processing the target vehicle driving data and the reference vehicle driving data generated within the preset time period based on a preset association mining strategy, and obtaining multiple associations between the target vehicle driving data and the reference vehicle driving data, wherein the license plate data contained in each of the reference vehicle driving data matches the license plate data contained in each of the target vehicle driving data; the associations include at least one of the following: a relationship representing the same driving trajectory, a relationship representing the same starting point and the same destination; The processing module is also used for: Based on the license plate data of each target vehicle driving data, reintegrate the first clustering results to obtain a plurality of second clustering results; wherein the license plate data of each target vehicle driving data in each second clustering result is the same, and the faces located inside the vehicle in the vehicle driving image match; For the plurality of second clustering results, respectively selecting the target vehicle driving data having the greatest similarity with the cluster centroid of the corresponding second clustering result from the target vehicle driving data included in the second clustering results as the centroid vehicle driving data corresponding to the corresponding second clustering result; Based on each obtained association relationship, determine the target similarity between each two centroid vehicle driving data; The second clustering results corresponding to each of the two centroid vehicle driving data whose target similarity is greater than a preset similarity condition are merged to obtain at least one target clustering result.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
9. A computer device, characterized in that: include: A memory for storing program instructions; The processor is used to call the program instructions stored in the memory, and execute the method according to any one of claims 1 to 6 according to the obtained program instructions.
10. A computer-readable storage medium, characterized in that: The storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Clustering method and device, electronic equipment and computer readable storage medium
CN114004988A
Image processing method and device
CN114155576A
Context-inclusive face clustering
US11080316B1
