Internet of Vehicles data processing method and device, electronic equipment and storage medium
By using target weights and scale parameters to determine the clustering center in the data processing of Internet of Vehicles, and combining local density and distance sorting, clustering processing is optimized, the problem of poor clustering effect in the existing technology is solved, and more accurate data is achieved Mining and feature correlation recognition.
Patent Information
- Application Number
- CN202411193111.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-31
AI Technical Summary
When using clustering algorithms to mine data from Internet of Vehicles, the prior art cannot accurately identify the boundary points of different clusters and determine key attribute characteristics, resulting in poor clustering effect.
By determining the target clustering center of the sample data based on the target weight and scale parameters, combining local density and distance sorting, clustering processing is optimized to ensure the accuracy of clustering results.
It improves the accuracy of the clustering algorithm, accurately recognizes the correlation of attribute features in vehicle network data, and enhances the data mining effect.
Smart Images

Figure CN119226825A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicles, and more specifically, to a method, device, electronic device and storage medium for processing Internet of Vehicles data in the field of vehicles. Background Art
[0002] The Internet of Vehicles uses vehicles on the road as information perception objects, and through information and communication technology, realizes network connections between vehicles, people, roads, and service platforms, improves the overall intelligent driving level of vehicles, and provides users with safe, comfortable, intelligent, and efficient driving experience and transportation services. By mining Internet of Vehicles data and determining the correlation between different attribute features, better vehicle services can be provided to users.
[0003] However, in the prior art, when clustering algorithms are used to perform data mining on the Internet of Vehicles, the boundary points of different clusters are not accurately identified and the key attribute characteristics in the Internet of Vehicles cannot be determined, resulting in poor clustering effect. Therefore, how to improve the accuracy of clustering algorithms to achieve data mining on the Internet of Vehicles is a technical problem that needs to be solved at present. Summary of the invention
[0004] The present application provides a method, device, electronic device and storage medium for processing Internet of Vehicles data. The method determines the target clustering center of sample data based on target weight and scale parameters, and performs clustering processing on the sample data, which can improve the accuracy of the clustering algorithm to determine the correlation between various attribute features in the Internet of Vehicles data.
[0005] In a first aspect, a method for processing Internet of Vehicles data is provided, the method comprising:
[0006] Get sample data of Internet of Vehicles;
[0007] Based on the sample data, determine the target weight of the attribute characteristics of the sample data and the scale parameter of the sample data; wherein the target weight is used to indicate the degree of influence of the attribute characteristics on the clustering result; and the scale parameter is used to indicate the degree of influence of the distance between the sample data on the clustering result;
[0008] Based on the target weight and scale parameters, determine the target cluster center of the sample data;
[0009] The sample data is clustered based on the target cluster center to obtain the clustering result of the Internet of Vehicles data; wherein the clustering result of the Internet of Vehicles data is used to represent the correlation degree of attribute features in the Internet of Vehicles data.
[0010] In an embodiment of the present application, after obtaining the sample data of the Internet of Vehicles, the cluster center of the sample data is determined according to the target weight of the attribute characteristics of the sample data and the scale parameter of the sample data; since the target weight is used to represent the degree of influence of each attribute characteristic of the sample data on the clustering result, different attribute characteristics have different degrees of influence on the clustering result, and the corresponding target weights are different. In addition, since different sample data have different degrees of influence on the distance, that is, different sample data have different corresponding scale parameters; in the above scheme, when determining the cluster center of the sample data, the influence of both the target weight of the attribute characteristics and the scale parameter of the sample data on the clustering result can be considered at the same time, so that a more accurate cluster center can be obtained; on the premise that the cluster center is more accurate, clustering the sample data can improve the accuracy of the clustering result of the Internet of Vehicles data.
[0011] In combination with the first aspect, in some implementations of the first aspect, determining a target cluster center of the sample data based on the target weight and the scale parameter includes:
[0012] Based on the target weight and the scale parameter, determine the target local density ranking; wherein the target local density ranking is the local density ranking of each sample data in the sample data;
[0013] Based on the target distance between the sample data and the target sample data, the target distance ranking is determined; wherein the target sample data is data in the sample data whose local density is greater than the local density of each sample data; the target distance is the minimum distance between each sample data and the target sample data; the target distance ranking is the minimum distance ranking of each sample data in the sample data;
[0014] The target cluster center is determined based on the target local density sorting and target distance sorting.
[0015] In an embodiment of the present application, the local density of each sample data is determined based on the target weight and scale parameter; and the local density of each sample data is sorted to obtain a target local density sorting; the target distance between the sample data and the target sample data is determined, and the target distance is sorted to obtain a target distance sorting; since the local density is used to represent the data density in the neighborhood of each sample data, that is, the density of the sample data in the neighboring area; and the target distance is used to represent the minimum distance between the sample data and other sample data with higher local density; therefore, based on the target local density sorting and the target distance sorting, the target cluster center is determined; so that the local density of the obtained target cluster center is larger, and the distance from the sample data with higher local density is farther; ensure that a more accurate target cluster center is obtained.
[0016] In combination with the first aspect and the above implementations, in some implementations of the first aspect, determining the target cluster center based on the target local density sorting and the target distance sorting includes:
[0017] Determine the first N sample data that are in the top N of the target local density sorting and in the top N of the target distance sorting as the first cluster center;
[0018] If the evaluation index of the first cluster center is greater than a preset threshold, the first cluster center is determined as the target cluster center; wherein the evaluation index is used to represent the clustering effect of the first cluster center.
[0019] In an embodiment of the present application, the first N first sample data located in the target local density sorting and the first N first sample data located in the target distance sorting are determined as the first cluster center; and the first cluster center is evaluated by the evaluation index of the first cluster center; if the evaluation index of the first cluster center is greater than the preset threshold, the first cluster center is determined as the target cluster center; because the first cluster center is determined as the target cluster center when the evaluation index is greater than the preset threshold; it is ensured that the cluster center can be evaluated; the first cluster center with better clustering results is determined as the target cluster center; thereby a more accurate clustering result can be obtained.
[0020] In combination with the first aspect and the above implementations, in some implementations of the first aspect, determining, based on the sample data, a target weight of an attribute feature of the sample data and a scale parameter of the sample data includes:
[0021] Determine the degree of dispersion of the attribute characteristics relative to the target mean; where the target mean is the mean of the attribute characteristics in the sample data;
[0022] Based on the degree of dispersion, determine the target weight of the attribute feature;
[0023] Based on the target weight, the scale parameter of the sample data is determined.
[0024] In an embodiment of the present application, the target weight of the attribute feature is determined based on the degree of discreteness of the attribute feature relative to the target mean; if the degree of discreteness of the attribute feature is larger, it means that the attribute feature contains more information and can show the difference between different sample data; therefore, the corresponding target weight is larger; and based on the target weight, the scale parameter of the sample data is determined.
[0025] In combination with the first aspect and the above implementations, in some implementations of the first aspect, determining a scale parameter of the sample data based on the target weight includes:
[0026] Based on the target weight, determine the first distance and the second distance of each sample data; wherein the first distance is the distance between each sample data and the second sample data; the second distance is the sum of the distances between each sample data and each candidate data in the candidate data set; the candidate data set includes the second sample data and the sample data in the neighborhood of the second sample data;
[0027] A scale parameter between each sample data is determined based on a ratio of the first distance to the second distance of each sample data.
[0028] In an embodiment of the present application, based on the target weight, the first distance and the second distance of each sample data are determined; that is, the distance between each sample data and the second sample data, and the sum of the distances between each sample data and the candidate data set of the second sample data are determined; since the candidate data set includes the second sample data and the sample data in the neighborhood of the second sample data; therefore, the second distance can reflect the distance between each sample data and each sample data in the neighborhood of the second sample data; that is, the distribution of the second sample data is different, the sample data in the neighborhood of the second sample data is different, and the corresponding second distance is different; based on the ratio of the first distance to the second distance, the scale parameter between each sample data is determined, and the obtained scale parameter can reflect the distance between the two sample data and the distance between the sample data and the candidate data set.
[0029] In combination with the first aspect and the above implementations, in some implementations of the first aspect, clustering the sample data based on the target cluster center to obtain a clustering result of the Internet of Vehicles data includes:
[0030] Determine the third distance between each sample data and the target cluster center;
[0031] Based on the third distance of each sample data and the target cluster center, the clustering result of the Internet of Vehicles data is obtained.
[0032] In an embodiment of the present application, the clustering result of the Internet of Vehicles data is obtained based on the third distance between each sample data and the target cluster center and the target cluster center; that is, each sample data is traversed, and each sample data and the target cluster center with the closest distance are divided into the same cluster data to obtain the clustering result of the Internet of Vehicles data.
[0033] In combination with the first aspect and the above implementations, in some implementations of the first aspect, before obtaining sample data of the Internet of Vehicles, the method further includes:
[0034] Obtain initial data of the Internet of Vehicles;
[0035] Obtaining sample data of the Internet of Vehicles includes: performing data preprocessing on initial data to obtain sample data; wherein the data preprocessing includes at least one of data cleaning, data conversion and data aggregation.
[0036] In an embodiment of the present application, after the initial data is acquired, data preprocessing is performed on the initial data; thereby removing noise data in the Internet of Vehicles data, reducing data dimensions, and improving data quality, so that the sample data can be better clustered, the intrinsic relationship between the Internet of Vehicles data can be discovered, and the accuracy of clustering analysis can be improved.
[0037] In combination with the first aspect and the above implementations, in some implementations of the first aspect, determining a target weight of an attribute feature of the sample data based on the sample data includes:
[0038] Extract features from sample data based on target requirements to obtain attribute features of the sample data;
[0039] Based on the sample data and attribute characteristics, the target weights of the attribute characteristics are determined.
[0040] In the embodiments of the present application, since Internet of Vehicles data usually contains features of multiple dimensions, but not all features of all dimensions have a substantial effect on clustering, if too many features are extracted, it may lead to redundancy of attribute features and reduce the efficiency and accuracy of clustering. Therefore, based on the target requirements, feature extraction is performed on the preprocessed sample data to obtain the attribute features of the sample data, ensuring that the obtained attribute features are consistent with the target requirements, thereby avoiding the influence of attribute feature redundancy on the efficiency and accuracy of clustering.
[0041] In a second aspect, a device for processing Internet of Vehicles data is provided, the device comprising:
[0042] An acquisition module is used to obtain sample data of the Internet of Vehicles;
[0043] The first determination module is used to determine the target weight of the attribute feature of the sample data and the scale parameter of the sample data based on the sample data; wherein the target weight is used to indicate the influence of the attribute feature on the clustering result; and the scale parameter is used to indicate the influence of the distance between the sample data on the clustering result;
[0044] The second determination module is used to determine the target cluster center of the sample data based on the target weight and the scale parameter;
[0045] The processing module is used to perform clustering processing on the sample data based on the target cluster center to obtain the clustering result of the Internet of Vehicles data; wherein the clustering result of the Internet of Vehicles data is used to represent the correlation degree of the attribute features in the Internet of Vehicles data.
[0046] In a third aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the electronic device executes the method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0047] In a fourth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0048] In a fifth aspect, a computer-readable storage medium is provided, which stores instructions. When the instructions are executed on an electronic device, the electronic device executes the method in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a sample data distribution diagram provided in an embodiment of the present application;
[0050] Figure 2 This is a schematic diagram of a clustering result provided in an embodiment of the present application;
[0051] Figure 3 is a schematic flow chart of a method for processing Internet of Vehicles data provided in an embodiment of the present application;
[0052] Figure 4 is a schematic flow chart of another method for processing Internet of Vehicles data provided in an embodiment of the present application;
[0053] Figure 5 It is a structural schematic diagram of a vehicle networking data processing device provided in an embodiment of the present application;
[0054] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0056] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0057] The Internet of Vehicles uses vehicles in motion as information perception objects. Through information and communication technology, it realizes network connections between vehicles, people, roads, and service platforms, improves the overall intelligent driving level of vehicles, and provides users with safe, comfortable, intelligent, and efficient driving experience and transportation services. Internet of Vehicles data not only contains information on vehicle use and maintenance, but also contains potential market trends and consumer preferences. Therefore, it is particularly important for automobile companies to extract valuable information from massive data and identify consumption patterns and behavioral laws.
[0058] In the prior art, clustering algorithms are usually used for data mining to group similar data into the same cluster, so that the similarity between data in the same cluster is higher (the distance is closer), and the similarity between data in different clusters is lower (the distance is farther), thereby determining the correlation between data, discovering the inherent structure in the data, and classifying vehicle data points with similar characteristics into one category, thereby revealing the potential rules of the data.
[0059] However, in the prior art, when clustering algorithms are used to perform data mining on the Internet of Vehicles, the boundary points of different clusters are not accurately identified and the key attribute characteristics in the Internet of Vehicles cannot be determined, resulting in poor clustering effect. Therefore, how to improve the accuracy of clustering algorithms to achieve data mining on the Internet of Vehicles is a technical problem that needs to be solved at present.
[0060] In view of this, the present application provides a method, device, electronic device and storage medium for processing Internet of Vehicles data. Through the embodiments of the present application, based on the target weight and scale parameters, the target cluster center of the sample data is determined, and the sample data is clustered, which can improve the accuracy of the clustering algorithm to determine the correlation between each attribute feature in the Internet of Vehicles data.
[0061] Figure 1 This is a sample data distribution diagram provided in an embodiment of the present application.
[0062] For example, Figure 1 As shown in the figure, each sample data has two attribute features, namely attribute x and attribute y. According to the value of attribute x and attribute y of each sample data, the sample data is marked in Figure 1 Each sample data corresponds to Figure 1 A point in the.
[0063] For example, the sample data are clustered by calculating the distance between each sample data; the sample data with a close distance are divided into a cluster; so that the difference between the data points in the cluster is small, while the difference between the data points in different clusters is large. Density peaks clustering (DPC) is a commonly used clustering method that identifies the cluster center and boundary points by calculating the local density of each data point and the distance to the high-density point; this method shows high efficiency and accuracy in processing non-spherical distribution data and unbalanced data sets.
[0064] Exemplarily, when using the density peak clustering method for clustering, data points with larger local density and larger target distance are selected as cluster centers; and each data point is assigned to the cluster center with the nearest distance to obtain a clustering result; wherein the target distance represents the minimum distance between a data point and a data point with larger local density.
[0065] For example, Figure 1 The sample data in the cluster analysis is performed, and the clustering results are as follows Figure 2 shown.
[0066] Figure 2 This is a schematic diagram of clustering results provided in an embodiment of the present application.
[0067] For example, Figure 2 As shown, Figure 1 The sample points corresponding to the sample data in are clustered into 4 clusters, namely the first cluster corresponding to the circular data points; the second cluster corresponding to the rectangular data points; the third cluster corresponding to the diamond data points, and the fourth cluster corresponding to the triangular data points.
[0068] For example, the density peak clustering method in the prior art considers other data points near each data point as equally important; however, this method has certain limitations; for example, the kth neighboring data point among the neighboring data points of a data point may be easily affected by noise data points due to its long distance, resulting in errors in the local density calculation of the boundary point. Figure 2 As shown, there are data point a, data point b and data point c at the boundary between the first cluster and the second cluster; and the distance between data point c and data point b is smaller than the distance between data point c and data point a; if traditional density peak clustering is used; it is easy to divide data point c and data point b into the same cluster, that is, divide data point c into the second cluster; it is not easy to divide data point c into the first cluster where data point a is located, which affects the clustering result of the data point.
[0069] Below Figure 3 and Figure 4 The method for processing Internet of Vehicles data provided in the embodiment of the present application is described in detail.
[0070] Figure 3 It is a schematic flowchart of a method for processing Internet of Vehicles data provided in an embodiment of the present application.
[0071] For example, Figure 3 The method 300 shown may be executed by an electronic device having a clustering analysis function; or by a processor or chip of the electronic device.
[0072] like Figure 3 As shown, the processing method 300 includes S310 to S340, and S310 to S340 are described in detail below.
[0073] S310, obtaining sample data of the Internet of Vehicles.
[0074] Among them, Vehicle-to-Everything (V2X) refers to the communication network between vehicles and other vehicles, infrastructure, pedestrians, etc. in the surrounding environment; V2X data includes but is not limited to: on-board sensor data, vehicle management system data, driver behavior data, external environment data, social media and user-generated content, infrastructure data, etc.
[0075] Exemplarily, vehicle sensor data may include vehicle location information, speed and acceleration data, vehicle health status (such as engine status, fuel level), road condition information collected by vehicle cameras and radar systems, etc. Vehicle management system data may include vehicle odometer data, vehicle maintenance records, and vehicle fault codes, etc. Driver behavior data includes: acceleration and braking modes, user driving habits, and driving route preferences, etc. External environment data may include: weather information, traffic light status, road traffic flow information, and urban planning data, etc. Social media and user-generated content may include: user comments and feedback on different vehicle models and vehicle functions; Infrastructure data includes: road conditions, bridge and tunnel status, and the operating status of public transportation systems.
[0076] By performing cluster analysis on Internet of Vehicles data, the correlation between different attribute characteristics of Internet of Vehicles data can be determined, so as to analyze traffic patterns, optimize route planning, improve vehicle performance, and provide users with a personalized driving experience.
[0077] In one implementation, before obtaining sample data of the Internet of Vehicles, the method further includes: obtaining initial data of the Internet of Vehicles; and performing data preprocessing on the initial data to obtain sample data.
[0078] The data preprocessing includes at least one of data cleaning, data conversion and data aggregation.
[0079] Exemplarily, data cleaning is to fill in missing data and remove abnormal data in sample data; data conversion refers to converting sample data into a data form suitable for analysis; for example, converting non-numeric attributes into numerical attributes, or discretizing continuous variables, or normalizing data and converting data to the same scale; data aggregation refers to merging data from multiple data sources in the data to meet the needs of data analysis.
[0080] In an embodiment of the present application, after the initial data is acquired, data preprocessing is performed on the initial data; thereby removing noise data in the Internet of Vehicles data, reducing data dimensions, and improving data quality, so that the sample data can be better clustered, the intrinsic relationship between the Internet of Vehicles data can be discovered, and the accuracy of clustering analysis can be improved.
[0081] In one implementation, after the sample data is acquired, feature extraction is performed on the preprocessed sample data based on target requirements to obtain attribute features of the sample data.
[0082] Exemplarily, feature extraction is performed on the preprocessed sample data according to the purpose requirement; for example, if the purpose requirement is to identify the user's consumption pattern; then the factors that may affect the user's consumption pattern are determined, and feature extraction is performed based on the possible influencing factors, such as the type of vehicle used by the user, the user's age range, the user's gender, and the frequency of use of a certain characteristic function of the vehicle; by identifying the user's consumption pattern, the sales pattern of different models can be determined.
[0083] For example, if the target requirement is to study the initial temperature of the vehicle air conditioner; to make the initial temperature when the air conditioner is turned on more in line with user needs, or to determine the time when the vehicle automatically turns on the air conditioner; then feature extraction is performed based on possible influencing factors; as shown in Table 1:
[0084] Table 1
[0085] Sample Data User age External temperature External humidity Air conditioning temperature Data 1 Age 1 Temperature 1 Humidity 1 Temperature Data 2 Age 2 Temperature 2 Humidity 2 Temperature b Data 3 Age 3 Temperature 3 Humidity 3 Temperature Data 4 Age 4 Temperature 4 Humidity 4 Temperature Data 5 Age 5 Temperature 5 Humidity 5 Temperature
[0086] Among them, data 1 to data 5 represent sample data; the attribute characteristics of the sample data include: user age, external temperature, external humidity and air-conditioning temperature.
[0087] In the embodiments of the present application, since the Internet of Vehicles data usually contains features of multiple dimensions; however, not all features of all dimensions have a substantial effect on the clustering results; if too many features are extracted, it may lead to redundancy of attribute features and reduce the efficiency and accuracy of clustering; therefore, based on the target requirements, feature extraction is performed on the preprocessed sample data to obtain the attribute features of the sample data, ensuring that the obtained attribute features are consistent with the target requirements of the research.
[0088] S320: Based on the sample data, determine the target weight of the attribute feature of the sample data and the scale parameter of the sample data.
[0089] Among them, the target weight is used to indicate the influence of attribute features on the clustering results; the larger the target weight, the greater the influence of attribute features on the clustering results; the scale parameter is used to indicate the influence of the distance between sample data on the clustering results.
[0090] The method for determining the target weight and scale parameters is described in detail below.
[0091] In one implementation, the above-mentioned determining, based on the sample data, the target weight of the attribute feature of the sample data and the scale parameter of the sample data includes:
[0092] Determine the degree of dispersion of the attribute characteristics relative to the target mean; where the target mean is the mean of the attribute characteristics in the sample data;
[0093] Based on the degree of discreteness, the target weight of the attribute feature is determined; based on the target weight, the scale parameter of the sample data is determined.
[0094] Exemplarily, the degree of dispersion of the attribute feature relative to the mean value of the attribute feature is calculated; and based on the degree of dispersion, the target weight of the attribute feature is determined; for example, the target weight of the attribute feature can be calculated by formula (1):
[0095]
[0096] Among them, w c represents the weight of attribute feature c, that is, the degree of discreteness of attribute feature c; n represents the number of data points in the sample data; represents the mean of the attribute feature c in the sample data; x ic Represents the value of the attribute feature c of the i-th sample point.
[0097] Exemplarily, the target weight of the attribute feature is determined based on the degree of dispersion of the attribute feature relative to the target mean; if the degree of dispersion of the attribute feature is large, it means that the attribute feature can show the difference between different sample data; therefore, the corresponding target weight is larger; and based on the target weight, the scale parameter of the sample data is determined.
[0098] For example, taking the sample data in Table 1 as an example, the weights of each attribute feature are calculated as follows:
[0099] Age weight: in, Represents the mean of the age of the sample data;
[0100] Weight of external temperature: in, Represents the mean of the outside temperatures for the sample data.
[0101] It should be noted that the weights of the external humidity and air conditioning temperature attribute characteristics can be found in the above calculation process and will not be repeated here.
[0102] Optionally, the target weight of each attribute feature is determined according to the target demand; the higher the impact of the attribute feature on the target demand of the research, the greater the corresponding target weight; for example, in automobile sales data, some attribute features (such as price range or fuel efficiency) may have a greater impact on consumer decisions than other features (such as vehicle color or interior material); therefore, the corresponding target weight is also greater.
[0103] Exemplarily, when calculating the distance between two sample data, the cosine distance formula may be used for calculation; the cosine distance formula in the prior art is shown in formula (2); the embodiment of the present application calculates the distance between two sample data according to the target weight of the attribute feature, as shown in formula (3):
[0104]
[0105] Among them, x i With x j represents two sample points in the sample data; p represents the number of attribute features of the sample data, and aπ is an adjustment coefficient used to control the sensitivity of the measurement formula.
[0106] For example, the cosine distance formula in formula (3) can more effectively distinguish the similarities and differences between sample data when processing high-dimensional data, helping companies analyze consumer behavior and optimize vehicle product design.
[0107] It should be noted that when calculating the distance between two sample data, this solution can also use the Euclidean distance formula for calculation, as shown in formula (4):
[0108]
[0109] In one implementation, the above-mentioned determining the scale parameter of the sample data based on the target weight includes:
[0110] Based on the target weight, determine the first distance and the second distance of each sample data; wherein the first distance is the distance between each sample data and the second sample data; the second distance is the sum of the distances between each sample data and each candidate data in the candidate data set; the candidate data set includes the second sample data and the sample data in the neighborhood of the second sample data;
[0111] A scale parameter between each sample data is determined based on a ratio of the first distance to the second distance of each sample data.
[0112] The area of the second sample data represents an area whose distance to the second sample data is less than a preset threshold.
[0113] Exemplarily, the area of the second sample data can be determined according to the distance; for example, with the second sample data as the center, d c is the radius, and the circular area determined is the area of the second sample data.
[0114] Exemplarily, the scale parameter of each sample data is determined based on the target weight: first, the first distance between each sample data and the second sample data is calculated using formula (3) or formula (4); secondly, a candidate data set is determined, the candidate data set includes the second sample data and the target candidate data; that is, the candidate data set includes the second sample data and the neighboring data of the second sample data; then, the sum of the distances between each sample data and each data in the candidate data set is calculated to obtain the second data; and the scale parameter is obtained based on the ratio of the first distance to the second distance.
[0115] For example, the scale parameter can be calculated by the following formula:
[0116]
[0117] γ=1-ln(w(i,j)); Formula (6)
[0118] Among them, d(x i , x j ) represents the distance between sample data i and sample data j; k(x i ) represents the data set consisting of the k nearest neighbors of sample data i; w(i, j) represents the ratio of the first distance from sample data i to sample data j to the sum of the distances from the k nearest neighbors of sample data i to sample data j; γ represents the scale parameter.
[0119] Exemplarily, the k nearest neighbors of sample data i are the k numbers closest to the sample data i, that is, the distance from each sample data in the sample data to the sample data i is calculated, and the distances are sorted from small to large, and the top k sample data are selected as the k nearest neighbors of the sample data i, that is, the k nearest neighbors of the sample data i.
[0120] For example, Figure 2Take for example, if k is 4; when calculating the scale parameter between data point c and data point a, determine the first distance between data point a and data point c; determine the 4 nearest neighbor data to data point a, calculate the sum of the distances between data point a and the 4 nearest neighbor data of data point a and point c as the second distance; that is, the distribution of data points in the neighborhood of data point a is taken into account; and the scale parameters of data point a and data point c are obtained according to the ratio of the first distance to the second distance; similarly, the scale parameters of data point b and data point c can be obtained. Since the distance from the nearest neighbor data of data point a to data point c is taken into account when calculating the scale parameters of data point a and data point c, and the distance from the nearest neighbor data of data point b to data point c is taken into account when calculating the scale parameters of data point b and data point c; therefore, the error in calculating the local density of the boundary point (data point c) can be reduced.
[0121] In an embodiment of the present application, since the candidate data results include the second sample data and the neighboring data of the second sample data; therefore, the second distance can reflect the distance between each sample data and each sample data in the neighborhood of the second sample data; that is, the distribution of the second sample data is different, the neighboring data of the second sample data is different, and the corresponding second distance is different; based on the ratio of the first distance to the second distance, the scale parameter between each sample data is determined, and the obtained scale parameter can reflect the distance between the two sample data and the distance between the sample data and the candidate data set.
[0122] S330, determining a target cluster center of the sample data based on the target weight and the scale parameter.
[0123] In one implementation, the above-mentioned determining the target cluster center of the sample data based on the target weight and the scale parameter includes:
[0124] Based on the target weight and the scale parameter, determine the target local density ranking; wherein the target local density ranking is the local density ranking of each sample data in the sample data;
[0125] Based on the target distance between the sample data and the target sample data, the target distance ranking is determined; wherein the target sample data is data in the sample data whose local density is greater than the local density of each sample data; the target distance is the minimum distance between each sample data and the target sample data; the target distance ranking is the minimum distance ranking of each sample data in the sample data;
[0126] The target cluster center is determined based on the target local density sorting and target distance sorting.
[0127] Exemplarily, based on the target weight and the scale parameter, the local density of each sample data is determined; when calculating the local density, the contribution of the surrounding data points of each sample data to the local density of each sample data is taken into account; that is, the local density of the sample data is obtained by calculating the Gaussian kernel of each neighboring data of the sample data to the sample data and summing them up; specifically, the local density of the sample data can be calculated using formula (7):
[0128]
[0129] Among them, x j is x i The number of k nearest neighbors.
[0130] Exemplarily, the local density of each sample data is calculated, and the local density of each sample point is sorted to obtain a target local density sorting; based on the target local density sorting, the target sample data is determined, and the minimum distance from the sample data to the target sample data is determined as the target distance, and the target distances are sorted to obtain a target distance sorting.
[0131] For example, the sample data includes {data 1, data 2, data 3, data 4, data 5, data 6}; the local density of each sample data is calculated, as shown in Table 2:
[0132] Table 2
[0133] Sample Data Local Density Data 1 2.3 Data 2 4.0 Data 3 1.7 Data 4 5.0 Data 5 7.5
[0134] Exemplarily, the local density of the sample data is sorted to obtain the target local density sorting, which is {data 5, data 4, data 2, data 1, data 3} in sequence; according to the target local density sorting, the target sample data is determined, thereby determining the target distance of each sample data; for example, when calculating the target distance of data 1, first determine the sample data whose local density is greater than that of data 1, that is, the target sample data of data 1 {data 5, data 4, data 2}, assuming that the distance from data 1 to data 5 is 6, the distance to data 4 is 8, and the distance to data 2 is 4; determine the minimum distance from data 1 to the sample data as the target distance, that is, the target distance of data 1 is 4. Calculate the target distance of each sample data in turn, and obtain Table 3:
[0135] Table 3
[0136] Sample Data Target distance Data 1 4.0 Data 2 3.5 Data 3 2.6 Data 4 1.0 Data 5 6.0
[0137] Exemplarily, the target distances of each sample data are sorted to obtain a target distance sorting, which is {data 5, data 1, data 2, data 3, data 4} in sequence; and the target cluster center is obtained according to the target local density sorting and the target distance sorting.
[0138] Optionally, by drawing a decision diagram of local density and target distance, a point in the decision diagram with larger local density and larger target distance is selected as the target cluster center; that is, according to the local density and target distance of each sample data, the sample data is marked in the coordinate system of the decision diagram; for example, data 1 (2.3, 4.0), data 2 (4.0, 3.5), data 3 (1.7, 2.6), data 4 (5.0, 1.0), data 5 (7.5, 6.0), select the coordinate system of the decision diagram with the lower left corner as the coordinate origin, and select the point in the upper right corner as the cluster center.
[0139] It should be noted that the above is an example of local density and target distance, and this application does not impose any limitation on this.
[0140] In an embodiment of the present application, the local density of each sample data is determined based on the target weight and scale parameter; and the local density of each sample data is sorted to obtain a target local density sorting; the target distance between the sample data and the target sample data is determined, and the target distance is sorted to obtain a target distance sorting; since the local density is used to represent the density of the area around the sample data, that is, the density of the sample data in its neighboring area; and the target distance is used to represent the minimum distance between the sample data and other sample data with a higher local density; therefore, based on the target local density sorting and the target distance sorting, the target cluster center is determined; it is ensured that the local density of the target cluster center obtained is larger and the distance from the sample data with a higher local density is farther; it is ensured that a more accurate cluster center is obtained.
[0141] In one implementation, the above-mentioned determining the target cluster center based on the target local density sorting and the target distance sorting includes:
[0142] Determine the first N sample data that are in the top N of the target local density sorting and in the top N of the target distance sorting as the first cluster center;
[0143] If the evaluation index of the first cluster center is greater than a preset threshold, the first cluster center is determined as the target cluster center; wherein the evaluation index is used to represent the clustering effect of the first cluster center point.
[0144] The evaluation index includes the silhouette coefficient or the separation degree. The silhouette coefficient is an index used to evaluate the clustering effect. It is used to describe the outline clarity of each category (cluster) after clustering. It contains two factors, namely, cohesion and separation. The cohesion is used to reflect the closeness between a sample point and the data within the class. The separation is used to reflect the closeness between a sample point and the data outside the class. The calculation formula of the silhouette coefficient of each sample point is shown in formula (8):
[0145]
[0146] Among them, a(i) is the mean distance from sample point i to each sample point in the cluster, indicating the cohesion of the sample point; b(i) is the mean distance from sample point i to each sample point in the nearest cluster, indicating the separation of sample point i. It can be concluded from formula (8) that when a(i) is smaller and b(i) is larger, it means that the intra-cluster distance of sample point i is smaller and the inter-cluster distance is larger, then the corresponding clustering effect is better.
[0147] It should be noted that formula (8) is a calculation formula for the silhouette coefficient of a sample point; the silhouette coefficient of the clustering result is the mean of the silhouette coefficients of each sample point.
[0148] For example, the sample point data includes 7 sample points {A, B, C, D, E, F, G}; the clustering result is to divide the 7 sample points into three clusters; the first cluster is {A, B, C}; the second cluster is {D, E}, and the third cluster is {F, G}; when calculating the silhouette coefficient of the sample point a, the distance from A to B in the first cluster and the distance from the sample point A to C in the first cluster are calculated respectively, and the average of the two distances is taken as the cohesion of the sample point A; and the cluster closest to the first cluster, such as the second cluster, is determined; the average of the distances from A to D and E in the second cluster is calculated to obtain the separation of A; according to the cohesion and separation of A, the silhouette coefficient of the sample A is calculated using formula (8); similarly, the silhouette coefficient of each sample point is calculated in turn, and the average of the silhouette coefficient of each sample point identifies the silhouette coefficient of the clustering result.
[0149] Exemplarily, the segmentation degree represents the average distance between the cluster centers of each cluster; that is, the average distance between the target cluster centers; if the segmentation degree is larger, it means that the interval between clusters is farther, the similarity between clusters is lower, and the corresponding clustering effect is better.
[0150] For example, the clustering result is to divide 7 sample points into three clusters; the first cluster is {A, B, C}; the second cluster is {D, E}, and the third cluster is {F, G}; the cluster center of the first cluster is A, the cluster center of the second cluster is D, and the cluster center of the third cluster is F; then the distance between A and D, the distance between A and F, and the distance between D and F are calculated in turn, and the average is calculated to obtain the segmentation degree of the clustering result.
[0151] It should be noted that the above is an example of calculating the evaluation index, and this application does not make any specific limitation on this.
[0152] It should be understood that different evaluation indicators correspond to different preset thresholds; for example, the silhouette coefficient corresponds to a first preset threshold, and the segmentation degree corresponds to a second preset threshold.
[0153] Exemplarily, the sample data is clustered based on the first cluster center to obtain a first clustering result corresponding to the first cluster center, and an evaluation index of the first clustering result is determined; if the evaluation index of the first clustering result is greater than a preset threshold, it means that the clustering result obtained by clustering with the first cluster center is better; therefore, the first cluster center is determined as the target clustering center, and the clustering result corresponding to the first cluster center is used as the target clustering result.
[0154] If the evaluation index of the first clustering result corresponding to the first cluster center is less than or equal to the preset threshold, it means that the clustering result obtained by clustering with the first cluster center is poor; therefore, it is necessary to re-determine the first cluster center; until the evaluation index of the clustering result corresponding to the determined first cluster center meets the preset threshold, the first cluster center is determined as the target cluster center.
[0155] In an embodiment of the present application, the first N first sample data located in the target local density sorting and the first N first sample data located in the target distance sorting are determined as the first cluster center; and the first cluster center is evaluated by the evaluation index of the first cluster center; if the evaluation index of the first cluster center is greater than the preset threshold, the first cluster center is determined as the target cluster center; because the first cluster center is determined as the target cluster center when the evaluation index is greater than the preset threshold; it is ensured that the cluster center can be evaluated; the first cluster center with better clustering results is determined as the target cluster center; thereby a more accurate clustering result can be obtained.
[0156] S340, clustering the sample data based on the target cluster center to obtain a clustering result of the Internet of Vehicles data.
[0157] Among them, the clustering results of the Internet of Vehicles data are used to represent the correlation between the attribute features in the Internet of Vehicles data.
[0158] In one implementation, clustering the sample data based on the target cluster center to obtain the clustering result of the Internet of Vehicles data includes:
[0159] Determine the third distance between each sample data and the target cluster center;
[0160] Based on the third distance of each sample data and the target cluster center, the clustering result of the Internet of Vehicles data is obtained.
[0161] Exemplarily, the third distance between each sample data and each cluster center is calculated, and each sample data and the target cluster center with the closest distance are divided into the same cluster data to obtain the clustering result of the Internet of Vehicles data.
[0162] Exemplarily, Table 2 and Table 3 are used as examples. If the target cluster centers are data 2 and data 5, the distance between each sample data and the target cluster center is calculated, that is, the third distance between data 1, data 3, and data 4 to data 1 and data 5 is calculated respectively. According to the third distance, data 1, data 3, and data 4 are divided into the same cluster with the nearest target cluster center.
[0163] Optionally, the average distance between each sample data and the k nearest neighbors of the target cluster center is calculated; the average distance is determined as the third distance between the sample data and the target cluster center; and based on the third distance, each sample data and the nearest target cluster center are divided into the same cluster data.
[0164] Through the clustering results, the correlation between each attribute feature in the Internet of Vehicles data can be determined; for example, in the study of vehicle air-conditioning temperature settings, according to the clustering results, it is concluded that when the user's age is in the first age group (18 to 24 years old), the air-conditioning temperature is usually set at 20℃ to 22℃; when the user's age is in the second age group (25 to 30 years old), the air-conditioning temperature is usually set at 22℃ to 24℃, and when the user's age is in the third age group (over 30 years old), the air-conditioning temperature is usually set at 24℃ to 28℃; therefore, the initial temperature of the vehicle air-conditioning when it is started can be set according to the correlation between the air-conditioning temperature and the user's age; that is, the user's age group is identified, and the temperature of the vehicle air-conditioning is automatically adjusted according to the user's age group; similarly, by studying the correlation between the external temperature and humidity and the air-conditioning temperature, the vehicle can automatically adjust the temperature of the vehicle air-conditioning according to the identified temperature and humidity of the external environment.
[0165] It should be noted that the correlations of the above-mentioned attribute features are for illustration only and are not limited in this application.
[0166] In the above embodiment, after obtaining the sample data of the Internet of Vehicles, the cluster center of the sample data is determined according to the target weight of the attribute characteristics of the sample data and the scale parameter of the sample data; since the target weight is used to represent the degree of influence of each attribute characteristic of the sample data on the clustering result; different attribute characteristics have different degrees of influence on the clustering result, and the corresponding target weights are different. In addition, since different sample data have different degrees of influence on the distance, that is, different sample data have different corresponding scale parameters; in the above scheme, when determining the cluster center of the sample data, the influence of both the target weight of the attribute characteristics and the scale parameter of the sample data on the clustering result can be considered at the same time, so that a more accurate cluster center can be obtained; on the premise that the cluster center is more accurate, clustering the sample data can improve the accuracy of the clustering result of the Internet of Vehicles data.
[0167] Figure 4 It is a schematic flowchart of another method for processing Internet of Vehicles data provided in an embodiment of the present application.
[0168] For example, Figure 4 The method 400 shown may be executed by an electronic device having a clustering analysis function; or by a processor or chip of the electronic device.
[0169] like Figure 4 As shown, the processing method 400 includes S401 to S412, and S401 to S412 are described in detail below.
[0170] S401, obtaining sample data of the Internet of Vehicles.
[0171] Exemplarily, sample data of the Internet of Vehicles can be obtained through on-board equipment in the vehicle, vehicle management system, Internet of Vehicles service platform, road infrastructure, etc.; this solution does not specifically limit the method of obtaining sample data.
[0172] Optionally, the implementation of S401 can refer to Figure 3 The relevant description of S310 is not repeated here.
[0173] S402, performing data preprocessing on the sample data to obtain attribute features.
[0174] Exemplarily, data preprocessing of sample data includes data cleaning, data conversion and data aggregation; and feature extraction is performed on the sample data after data preprocessing to obtain attribute features.
[0175] Optionally, the implementation of S402 can refer to Figure 3 The description of the data preprocessing in S310 is not repeated here.
[0176] S403: Determine the target weight of each attribute feature based on the discrete degree of each attribute feature.
[0177] Exemplarily, the degree of dispersion represents the degree of dispersion of the attribute feature relative to the mean of the attribute feature; therefore, the greater the degree of dispersion, the greater the difference between the corresponding attribute feature and the mean of the attribute feature; that is, the attribute feature can reflect the differences between different sample data; therefore, the corresponding target weight is higher.
[0178] For example, if the discrete degree of an attribute feature is smaller, it means that the difference between the attribute feature corresponding to the discrete degree and the mean of the attribute feature is smaller, and the corresponding attribute feature cannot reflect the difference of the sample data. In order to reduce the influence of the attribute feature on the distance measurement, the weight of the attribute feature is determined to be smaller.
[0179] S404: Determine the first distance and the second distance of each sample data based on the target weight.
[0180] Exemplarily, the first distance is the distance between each sample data and the second sample data; the second distance is the sum of the distances between each sample data and each candidate data in the candidate data set; the candidate data set includes the second sample data and the target candidate data; the target candidate data is the neighboring data of the second sample data.
[0181] Optionally, the implementation of S404 can refer to Figure 3 The relevant description of S320 is omitted here.
[0182] S405: Determine a scale parameter based on the ratio of the first distance to the second distance of the sample data.
[0183] Optionally, the implementation of S405 can refer to Figure 3 The relevant description of determining the scale parameter in S320 of FIG. 1 is not repeated here.
[0184] S406, determining the local density of each sample data according to the scale parameter.
[0185] Exemplarily, local density is used to indicate the density of data points around each sample data; if the data points around the sample data are denser, the local density of the sample data is greater; if the data points around the sample data are sparser, the local density of the sample data is smaller.
[0186] Optionally, the implementation of S406 can refer to Figure 3 The relevant description of calculating the local density in S330 is not repeated here.
[0187] S407, determining the target distance of each sample data.
[0188] Exemplarily, the target data of sample data refers to the minimum distance from the sample data to the target sample data with higher local density; therefore, when determining the target distance, the local density of each sample data is sorted, and the target sample data whose local density is greater than the local density of each sample data is determined; usually, the target sample data is multiple data, and the minimum distance from each sample data to the target sample data is determined, and the minimum distance is determined as the target distance.
[0189] S408, determining a first cluster center based on the target local density sorting and the target distance sorting.
[0190] Exemplarily, the local density of each sample data is sorted to obtain a target local density sorting; the target distance of each sample data is sorted to obtain a target distance sorting; the first sample data that is in the first N of the target local density sorting and in the first N of the target distance sorting is determined as the first cluster center; that is, the sample data with a larger local density and a larger target distance is determined as the first cluster center.
[0191] S409, whether the evaluation index of the first cluster center is greater than a preset threshold; if so, execute S411; if not, execute S410.
[0192] Exemplarily, determine whether the evaluation index of the first cluster center is greater than a preset threshold; if the evaluation index is greater than the preset threshold, determine the first cluster center as the target cluster center; if the evaluation index is less than or equal to the preset threshold, re-determine the first cluster center until the index of the first cluster center is greater than the preset threshold.
[0193] S410: Re-determine the first cluster center.
[0194] Exemplarily, since the number of cluster centers is an uncertain value when clustering sample data, and since the number of cluster centers will affect the clustering results of the sample data; therefore, the clustering results of the first cluster center are judged by the evaluation index of the first cluster center; if the evaluation index is less than or equal to the preset threshold, it means that the corresponding clustering result of the first cluster center is poor; and the first cluster center needs to be re-determined.
[0195] S411: Determine the first cluster center as the target cluster center.
[0196] Exemplarily, if the evaluation index of the first cluster center is greater than a preset threshold, it means that the clustering result corresponding to the first cluster center is better, and therefore, the first cluster center is determined as the target cluster center.
[0197] S412, performing clustering processing according to the third distance between the sample data and the target cluster center to obtain a clustering result.
[0198] Optionally, the implementation of S412 can refer to Figure 3 The relevant description of S340 is not repeated here.
[0199] In an embodiment of the present application, data preprocessing is performed on the acquired sample data of the Internet of Vehicles to obtain attribute characteristics of the sample data; it is ensured that the noise data in the Internet of Vehicles can be removed, the data dimension can be reduced, and the data quality can be improved; the first cluster center is determined according to the local density and the target distance; due to the calculation process of the local density and the target distance, the target weight and scale parameter of the sample data are used; and the target weight is used to represent the degree of influence of each attribute feature of the sample data on the clustering result, and the scale parameter is used to represent the degree of influence of the distance between the sample data on the clustering result; therefore, it is ensured that when determining the target cluster center, the importance of different attribute features is taken into account, and the degree of influence of the distribution of the sample data on the cluster center is also taken into account; and the first cluster center is evaluated, and when it meets the evaluation indicators, the first cluster center is determined as the target cluster center; it is ensured that the clustering effect of the obtained target cluster center is good, thereby improving the accuracy of the clustering algorithm.
[0200] Combination of the above Figures 1 to 4 The method for processing vehicle network data provided by the embodiment of the present application is described in detail; Figure 5 and Figure 6 The device embodiments of the present application are described in detail. It should be understood that the device in the embodiments of the present application can execute the various methods of the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments.
[0201] Figure 5 It is a structural schematic diagram of a vehicle network data processing device provided in an embodiment of the present application.
[0202] For example, Figure 5 As shown, the vehicle networking data processing device 500 includes:
[0203] An acquisition module 510 is used to acquire sample data of the Internet of Vehicles;
[0204] The first determination module 520 is used to determine the target weight of the attribute feature of the sample data and the scale parameter of the sample data based on the sample data; wherein the target weight is used to indicate the influence of the attribute feature on the clustering result; and the scale parameter is used to indicate the influence of the distance between the sample data on the clustering result;
[0205] A second determination module 530 is used to determine a target cluster center of the sample data based on the target weight and the scale parameter;
[0206] The processing module 540 is used to perform clustering processing on the sample data based on the target cluster center to obtain the clustering result of the Internet of Vehicles data; wherein the clustering result of the Internet of Vehicles data is used to represent the correlation degree of the attribute features in the Internet of Vehicles data.
[0207] Optionally, as an embodiment, the second determination module 530 is specifically used to: determine the target local density ranking based on the target weight and the scale parameter; wherein the target local density ranking is the local density ranking of each sample data in the sample data;
[0208] Based on the target distance between the sample data and the target sample data, the target distance ranking is determined; wherein the target sample data is data in the sample data whose local density is greater than the local density of each sample data; the target distance is the minimum distance between each sample data and the target sample data; the target distance ranking is the minimum distance ranking of each sample data in the sample data;
[0209] The target cluster center is determined based on the target local density sorting and target distance sorting.
[0210] Optionally, as an embodiment, the second determination module 530 is specifically configured to: determine the first N sample data located in the top N of the target local density sorting and the top N of the target distance sorting as the first cluster center;
[0211] If the evaluation index of the first cluster center is greater than a preset threshold, the first cluster center is determined as the target cluster center; wherein the evaluation index is used to represent the clustering effect of the first cluster center point; the evaluation index includes a silhouette coefficient or a segmentation degree.
[0212] Optionally, as an embodiment, the first determination module 520 is specifically used to: determine the degree of dispersion of the attribute feature relative to the target mean; wherein the target mean is the mean of the attribute feature in the sample data;
[0213] Based on the degree of dispersion, determine the target weight of the attribute feature;
[0214] Based on the target weight, the scale parameter of the sample data is determined.
[0215] Optionally, as an embodiment, the first determination module 520 is specifically used to: determine the first distance and the second distance of each sample data based on the target weight; wherein the first distance is the distance between each sample data and the second sample data; the second distance is the sum of the distances between each sample data and each candidate data in the candidate data set; the candidate data set includes the second sample data and the target candidate data; the target candidate data is determined by sorting the second distance; the second distance sorting is the distance sorting between each sample data and the second sample data;
[0216] A scale parameter between each sample data is determined based on a ratio of the first distance to the second distance of each sample data.
[0217] Optionally, as an embodiment, the processing module 540 is specifically used to: determine the third distance between each sample data and the target cluster center; and obtain the clustering result of the Internet of Vehicles data based on the third distance between each sample data and the target cluster center.
[0218] Optionally, as an embodiment, the acquisition module 510 is specifically used to: acquire initial data of the Internet of Vehicles; perform data preprocessing on the initial data to obtain sample data; wherein the data preprocessing includes at least one of data cleaning, data conversion and data aggregation.
[0219] Optionally, as an embodiment, the first determination module 520 is specifically used to: extract features from the sample data based on target requirements to obtain attribute features of the sample data.
[0220] It should be noted that the above-mentioned vehicle network data processing device is embodied in the form of a functional unit. The term "module" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.
[0221] For example, a "module" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.
[0222] Therefore, the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0223] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0224] Exemplarily, the electronic device 600 includes: a processor 610 , a memory 620 , and an executable program code 630 .
[0225] Exemplarily, the electronic device 600 includes one or more processors 610, which can support the processing method in the method embodiment of the electronic device 600. The processor 610 can be a general-purpose processor or a special-purpose processor. For example, the processor 610 can be a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.
[0226] Exemplarily, the processor 610 may be used to control the electronic device 600, execute software programs, and process data of the software programs. The electronic device 600 may also include a communication unit to implement input (reception) and output (transmission) of signals.
[0227] Exemplarily, the electronic device 600 may include one or more memories 620 on which executable program code 630 is stored. The executable program code 630 can be executed by the processor 610 to generate instructions so that the processor 610 executes the processing method described in the above method embodiment according to the instructions.
[0228] Optionally, data may be stored in the memory 620. Optionally, the processor 610 may read data stored in the memory 620, which may be stored at the same storage address as the executable program code 630, or may be stored at a different storage address from the executable program code 630.
[0229] Exemplarily, the processor 610 and the memory 620 may be provided separately or integrated together, for example, integrated on a system on chip (SOC) of the terminal device.
[0230] Exemplarily, the memory 620 can be used to store relevant programs of the processing method provided in the embodiment of the present application, and the processor 620 can be used to call the executable program code 630 stored in the memory 620 when controlling the electronic device to execute the processing method of the embodiment of the present application; for example, obtain sample data of the Internet of Vehicles; based on the sample data, determine the target weight of the attribute characteristics of the sample data and the scale parameter of the sample data; wherein the target weight is used to indicate the degree of influence of the attribute characteristics on the clustering results; the scale parameter is used to indicate the degree of influence of the distance between the sample data on the clustering results; based on the target weight and the scale parameter, determine the target clustering center of the sample data; cluster the sample data based on the target clustering center to obtain the clustering results of the Internet of Vehicles data; wherein the clustering results of the Internet of Vehicles data are used to indicate the correlation between the attribute characteristics in the Internet of Vehicles data.
[0231] The present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the processing method of any of the aforementioned embodiments are implemented.
[0232] Among them, computer-readable storage media may include but are not limited to any type of disk, including floppy disks, optical disks, digital versatile disks (Digital Video Disc, DVD), compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), microdrives and magneto-optical disks, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable programmable read only memory (Electrically Erasable Programmable read only memory, EEPROM), dynamic random access memory (Dynamic Random Access Memory, DRAM), video random access memory (Video Random Access Memory, VRAM), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0233] The present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement a processing method in the above-mentioned embodiment.
[0234] In addition, the electronic device provided in the embodiments of the present application may specifically be a chip, a component or a module, and the electronic device may include a connected processor and a memory; wherein the memory is used to store instructions, and when the electronic device is running, the processor may call and execute instructions so that the chip executes a processing method in the above-mentioned embodiments.
[0235] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this application are all used to execute the corresponding processing methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding processing methods provided above, and will not be repeated here.
[0236] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0237] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0238] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for processing Internet of Vehicles data, characterized in that: The method comprises: Get sample data of Internet of Vehicles; Based on the sample data, determine the target weight of the attribute feature of the sample data and the scale parameter of the sample data; wherein the target weight is used to indicate the degree of influence of the attribute feature on the clustering result; and the scale parameter is used to indicate the degree of influence of the distance between the sample data on the clustering result; Determining a target cluster center of the sample data based on the target weight and the scale parameter; The sample data is clustered based on the target cluster center to obtain a clustering result of the Internet of Vehicles data; wherein the clustering result of the Internet of Vehicles data is used to represent the correlation degree of the attribute features in the Internet of Vehicles data.
2. The method according to claim 1, characterized in that: The determining the target cluster center of the sample data based on the target weight and the scale parameter includes: Based on the target weight and the scale parameter, determine the target local density ranking; wherein the target local density ranking is the local density ranking of each sample data in the sample data; Based on the target distance between the sample data and the target sample data, a target distance sorting is determined; wherein the target sample data is data in the sample data whose local density is greater than the local density of each sample data; the target distance is the minimum distance between each sample data and the target sample data; the target distance sorting is the minimum distance sorting of each sample data in the sample data; The target cluster center is determined based on the target local density ranking and the target distance ranking.
3. The method according to claim 2, characterized in that The determining the target cluster center based on the target local density sorting and the target distance sorting includes: Determine the first N sample data that are in the first N of the target local density sorting and in the first N of the target distance sorting as the first cluster center; If the evaluation index of the first cluster center is greater than a preset threshold, the first cluster center is determined as the target cluster center; wherein the evaluation index is used to represent the clustering effect of the first cluster center.
4. The method according to claim 1, characterized in that The determining, based on the sample data, a target weight of the attribute feature of the sample data and a scale parameter of the sample data includes: Determine the degree of dispersion of the attribute feature relative to a target mean; wherein the target mean is the mean of the attribute feature in the sample data; Based on the discrete degree, determining the target weight of the attribute feature; Based on the target weight, the scale parameter of the sample data is determined.
5. The method according to claim 4, characterized in that The determining the scale parameter of the sample data based on the target weight includes: Based on the target weight, determine the first distance and the second distance of each sample data; wherein the first distance is the distance between each sample data and the second sample data; the second distance is the sum of the distances between each sample data and each candidate data in the candidate data set; the candidate data set includes the second sample data and the sample data in the neighborhood of the second sample data; A scale parameter between the sample data is determined based on a ratio of the first distance to the second distance of the sample data.
6. The method according to any one of claims 1 to 5, characterized in that The clustering process of the sample data based on the target cluster center to obtain the clustering result of the Internet of Vehicles data includes: Determine a third distance between each sample data and the target cluster center; Based on the third distance of each sample data and the target cluster center, the clustering result of the Internet of Vehicles data is obtained.
7. The method according to claim 1, characterized in that Before obtaining the sample data of the Internet of Vehicles, the method further includes: Obtain initial data of the Internet of Vehicles; The obtaining of sample data of the Internet of Vehicles includes: Performing data preprocessing on the initial data to obtain the sample data; The data preprocessing includes at least one of data cleaning, data conversion and data aggregation.
8. A vehicle networking data processing device, characterized in that: The device comprises: An acquisition module is used to obtain sample data of the Internet of Vehicles; A first determination module is used to determine, based on the sample data, a target weight of an attribute feature of the sample data and a scale parameter of the sample data; wherein the target weight is used to indicate the degree of influence of the attribute feature on the clustering result; and the scale parameter is used to indicate the degree of influence of the distance between the sample data on the clustering result; A second determination module, configured to determine a target cluster center of the sample data based on the target weight and the scale parameter; A processing module is used to perform clustering processing on the sample data based on the target cluster center to obtain a clustering result of the Internet of Vehicles data; wherein the clustering result of the Internet of Vehicles data is used to represent the correlation degree of the attribute features in the Internet of Vehicles data.
9. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the electronic device executes the method as claimed in any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on an electronic device, the electronic device executes the method as claimed in any one of claims 1 to 7.
Citation Information
Cited By
Vehicle safety management method and system based on cloud computing
CN119516638A
