Method and device for selecting and classifying perception areas in sparse crowd sensing
By constructing a feature matrix in sparse swarm intelligence sensing and using a greedy approximation algorithm and a Bayesian convolutional neural network model to select the sensing region, the problem of insufficient selection of sensing region in sparse swarm intelligence sensing is solved, thereby improving classification accuracy and data representativeness.
Patent Information
- Application Number
- CN202411639036.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-11-18
AI Technical Summary
In existing sparse swarm intelligence sensing, the sensing region selection method suffers from insufficient classification accuracy. Existing methods fail to effectively select regions that are valuable for the classification task, resulting in insufficient data representativeness.
By acquiring sparse spatiotemporal data of the target region, preprocessing is performed to construct a feature matrix. A greedy approximation algorithm and a Bayesian convolutional neural network model are used to select the most valuable perception region. Combining parameter uncertainty and model performance evaluation, a combination of data-missing sub-regions is selected, and an active acquisition strategy is applied to optimize data acquisition.
It improves the classification accuracy of the classification model, reduces information overlap within combinations of missing data sub-regions, ensures the acquisition of the most valuable data within a limited budget, and enhances data representativeness and the performance of the classification model.
Smart Images

Figure CN119598123B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data classification, in particular to a method and device for selecting a sensing area in sparse crowd-sensing. BACKGROUND
[0002] With the wide application of sensor technology in mobile devices, crowd-sensing has gradually become an important means of data collection and environmental monitoring in smart cities. However, recruiting a large number of participants often means that costs need to be increased. For this reason, some researchers have proposed a novel crowd-sensing paradigm, "sparse crowd-sensing", which only needs to recruit a small number of participants to collect data from some sensing areas, and accurately infer the data of other non-sensing areas by mining the spatio-temporal correlation of the sensed data. Therefore, a new data acquisition mode of sparse crowd-sensing can be used to acquire target data, such as wind speed data, urban traffic flow or air quality data, to train the corresponding target classification model. However, the classification model trained based on the existing new data acquisition mode of sparse crowd-sensing still has the problem of insufficient classification accuracy. SUMMARY
[0003] The purpose of the present application is to provide a method and device for selecting a sensing area in sparse crowd-sensing. Research shows that the rationality of sensing area selection is a key problem in sparse crowd-sensing, and the rationality of sensing area selection directly affects the representativeness (value) of the acquired data, thereby affecting the training effect of the classification model and further affecting the classification accuracy of the classification model. The present application proposes a method for reasonably selecting a sensing area, which can select a region that is more valuable for the classification task. Based on the selected sensing area, the representativeness (value) of the collected data is improved, thereby improving the classification accuracy of the classification model.
[0004] To achieve the above purpose, the present application provides the following solutions:
[0005] In a first aspect, the present application provides a method for selecting a sensing area in sparse crowd-sensing, comprising:
[0006] acquiring sparse spatio-temporal data at time t in a target area; the target area includes a plurality of sub-areas;
[0007] preprocessing the sparse spatio-temporal data to obtain a feature matrix corresponding to each data missing sub-area; the feature matrix includes inferred data at a position corresponding to a data missing sub-area and the sparse spatio-temporal data; a data missing sub-area refers to a sub-area for which data has not been acquired;
[0008] selecting each to-be-collected sub-area from all data missing sub-areas according to the feature matrix corresponding to each data missing sub-area by using a greedy approximation algorithm.
[0009] In a second aspect, the application provides a data classification method, comprising:
[0010] acquiring historical spatiotemporal data in a target region and corresponding classification labels, and constructing an initial training data set;
[0011] training a target classification model using the current training data set;
[0012] determining whether the performance of the target classification model after training meets a preset performance requirement;
[0013] if yes, obtaining the trained target classification model to perform data classification;
[0014] if no, performing the sensing region selection method in sparse crowd-sensing according to any one of claims 1 to 4 based on sparse spatiotemporal data at time t in the target region, to obtain each to-be-collected sub-region;
[0015] acquiring spatiotemporal data of each to-be-collected sub-region according to a data acquisition mode of crowd-sensing;
[0016] adding the spatiotemporal data of the to-be-collected sub-region to the sparse spatiotemporal data at time t to obtain training data at time t; the classification label of the training data at time t is artificially predefined;
[0017] adding the training data at time t to the initial training data set to obtain an updated training data set;
[0018] taking the current updated training data set as the current training data set, and returning to the step of training the target classification model using the current training data set.
[0019] In a third aspect, the application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the sensing region selection method in sparse crowd-sensing or the data classification method.
[0020] In a fourth aspect, the application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executable by a processor to implement the sensing region selection method in sparse crowd-sensing or the data classification method.
[0021] In a fifth aspect, the application provides a computer program product comprising a computer program, wherein the computer program is executable by a processor to implement the sensing region selection method in sparse crowd-sensing or the data classification method.
[0022] According to the embodiments provided in the application, the following technical effects are disclosed:
[0023] The application provides a perception area selection method in sparse crowd-sourced perception, a classification method and a device, wherein sparse space-time data at a t time in a target area is acquired and preprocessed to obtain a feature matrix corresponding to each data missing sub-area; each to-be-collected sub-area is selected from all data missing sub-areas according to the feature matrix corresponding to each data missing sub-area by using a greedy approximation algorithm. The training data set of the data classification model is updated by acquiring the data of the to-be-collected sub-area, the classification model is retrained, and a classification model meeting the performance requirement is obtained. In the application, the data missing sub-area is selected by using the greedy approximation algorithm, and the value of a group of data missing sub-areas is jointly evaluated, so that the information overlap in the combination of data missing sub-areas is reduced. In addition, the sub-area more valuable for the classification task can be selected by using the greedy approximation algorithm, so that the data collected further is more valuable, and the classification precision is higher. Therefore, the application provides a method for reasonably selecting a perception area, the area more valuable for the classification task can be selected, the data is collected based on the selected perception area, the representativeness (value) of the collected data is improved, and the classification precision of the classification model is improved. BRIEF DESCRIPTION OF DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0025] Figure 1 A flowchart of a perception area selection method in sparse crowd-sourced perception is provided for Embodiment 1 of the present application.
[0026] Figure 2 A flowchart of a data classification method is provided for Embodiments 2 to 4 of the present application.
[0027] Figure 3 A technical concept diagram of the data classification method is provided for Embodiments 2 to 4 of the present application.
[0028] Figure 4 An active collection framework in sparse crowd-sourced perception focusing on downstream classification tasks is provided for Embodiments 2 to 4 of the present application. DETAILED DESCRIPTION
[0029] With reference to the drawings and the specific embodiments described below, the above and other aspects, features, and advantages of the present application will become more apparent, but should not be restricted by the embodiments described below.
[0030] The above and other aspects, features, and advantages of the present application will become more apparent, but should not be restricted by the embodiments described below.
[0031] Embodiment 1
[0032] The existing selection means of the sensing area of sparse crowd sensing has certain deficiencies. (1) Different sub-areas have different influences on data inference. At present, when a method for measuring the value of a sub-area is found, the sub-area with the highest value is simply selected. However, in reality, a group of sub-areas need to be selected, and there may be information overlap between different sensing sub-areas, which will lead to waste of sensing cost. Simply selecting the k sub-areas with the highest value cannot maximize the sensing information under the limited cost. (2) The sub-area group selection problem is a subset selection problem, which is usually an NP-hard problem. Some existing researches focus on the selection problem of sub-area group and use heuristic algorithms, convex optimization and other methods to approximately solve the NP-hard problem of sub-area group selection, but these works do not give the performance guarantee of the proposed approximate solution method. (3) The spatio-temporal data obtained by the crowd sensing system will be used in downstream tasks such as training machine models. After the downstream task is determined, using the downstream task to guide the selection of sub-areas will make the selected sub-areas more valuable to the downstream task, thereby obtaining more useful information with less cost. The existing researches consider the influence of sub-areas on data coverage when selecting sub-areas, but do not consider the influence on downstream tasks. (4) Generally, the data samples selected by the active learning method are independent, so only the numerical value of the data needs to be concerned. In sparse crowd sensing, the data to be selected has spatio-temporal correlation, and in addition to the numerical value of the data in the sub-area, the spatio-temporal characteristics of the sub-area itself also need to be considered. The existing researches have not proposed a data preprocessing method for preserving spatial information when using active learning algorithm to select sub-areas in sparse crowd sensing. Based on the above analysis, the embodiment provides a sensing area selection method in sparse crowd sensing, as shown in Figure 1 , which comprises:
[0033] Step 101: Obtain sparse spatiotemporal data at time t within the target region; the target region includes several sub-regions. When the sparse swarm sensing data acquisition method is applied to obtain air quality training data for an air quality classification model, the sparse spatiotemporal data is air quality sparse spatiotemporal data; when the sparse swarm sensing data acquisition method is applied to obtain traffic flow training data for a traffic flow classification model, the sparse spatiotemporal data is traffic flow sparse spatiotemporal data; when the sparse swarm sensing data acquisition method is applied to obtain wind speed training data for a wind speed magnitude classification model, the sparse spatiotemporal data is wind speed sparse spatiotemporal data.
[0034] As an example, the target area can be divided into several sub-regions, which can be achieved by dividing the target area into grids, with each grid corresponding to one sub-region.
[0035] Step 102: Preprocess the sparse spatiotemporal data to obtain the feature matrix corresponding to each data missing sub-region; the feature matrix includes the inferred data at the corresponding position of a data missing sub-region and the sparse spatiotemporal data; the data missing sub-region refers to the sub-region where no data has been obtained.
[0036] The sparse spatiotemporal data obtained does not correspond to data in every sub-region. Some sub-regions have not collected relevant data. Therefore, it is necessary to infer the data of the missing sub-regions and further derive the feature matrix of the missing sub-regions.
[0037] Step 103: Based on the feature matrix corresponding to each missing data sub-region, a greedy approximation algorithm is applied to select the sub-regions to be collected from all missing data sub-regions. The sub-regions to be collected are the sensing regions, or simply sensing sub-regions.
[0038] As an optional implementation, in step 102, the sparse spatiotemporal data is preprocessed to obtain the feature matrix corresponding to each data missing sub-region, specifically including:
[0039] (a1) Determine the data missing sub-region based on the sparse spatiotemporal data.
[0040] When there is no missing data in any sub-region at time t, X t Data x from m sub-regions p,t composition, use Let X represent the set of m subregions. However, in sparse swarm intelligence sensing... t It is sparse, meaning that there are missing data, i.e., |X t | <m。
[0041] When there are missing data in a sub-region at time t, the indicator It is used to represent whether data is missing in each sub-region. Indicators i from m sub-regions p,t Composition. When i p,t When = 0, it represents the data x at position p in the sub-region at time t. p,t Missing; when i p,t When = 1, it represents the data x at position p in the sub-region at time t. p,t Not missing. The set of missing data sub-regions obtained at time t.
[0042] (a2) Based on the data missing sub-regions, the sparse spatiotemporal data is represented in matrix form to obtain a sparse spatiotemporal data matrix; in the sparse spatiotemporal data matrix, the elements at the positions corresponding to the data missing sub-regions are 0, and the elements at the positions corresponding to the data not missing sub-regions are the actual collected data.
[0043] A matrix can store spatial information of sub-regions of spatiotemporal data. A matrix can be used to represent sparse spatiotemporal data Xt, where each sub-region p corresponds to an element in the matrix, and the data at point p is the data value of the corresponding element in the matrix. The transformation function is:
[0044] x matrix =Matrix(X) t ,I t )
[0045] when i p,t When = 1, it means that the data at position p is not missing, and the element corresponding to position p takes the value x. p,t Otherwise, the value is 0.
[0046] (a3) Based on the actual collected data in the sparse spatiotemporal data matrix, the data of the missing data sub-region is inferred to obtain the inferred data corresponding to the missing data sub-region.
[0047] All missing data points were obtained through linear interpolation and spatial smoothing. The corresponding location data is value. p .
[0048] Linear interpolation (time dimension): Using known data from previous time points, linear interpolation is used to predict missing values at the current time point. This method smoothly continues the data trend over time.
[0049] Spatial smoothing (spatial dimension): This method estimates missing values using a weighted average, leveraging known location data surrounding the missing value. Weights are typically set based on distance; points closer to the missing value have a greater impact on the estimate.
[0050] Combining the two methods: first, use linear interpolation in time to get a preliminary estimate, and then use spatial smoothing to further optimize and improve the accuracy of data calculation.
[0051] (a4) constructing an auxiliary matrix for each data missing sub-region; the auxiliary matrix includes the inferred data at the position corresponding to the data missing sub-region; in the auxiliary matrix, the element at the position corresponding to the data missing sub-region is the inferred data, and the elements at other positions are 0.
[0052] For each data missing point An auxiliary matrix matrix_aid is constructed p In this auxiliary matrix, the value at the position corresponding to the data missing point p is value p The values at the other positions are all 0.
[0053] (a5) obtaining the feature matrix corresponding to each data missing sub-region according to the auxiliary matrix and the sparse spatio-temporal data matrix.
[0054] The matrix x corresponding to the initial sparse spatio-temporal data at time t matrix is added to the auxiliary matrix matrix_aid of the data missing sub-region p p to obtain the feature matrix x' of the sub-region p p,t ;
[0055] x' p,t = Matrix(X t , I t ) + matrix_aid p
[0056] The feature matrices of all data missing sub-regions p constitute the data set D pool of the to-be-selected sub-regions.
[0057]
[0058] For data preprocessing, the sparse sensing spatio-temporal data are stored in a two-dimensional matrix, the sub-regions are associated with the matrix elements, a feature matrix is generated for each data missing sub-region, and the feature matrix stores the spatial information of the data missing sub-region and the information of other known sub-regions, which can assist in calculating the value of the sub-region and better select the required sensing sub-region.
[0059] In step 103, the greedy approximation algorithm process of sub-region selection at time t:
[0060] (1) Let b represent the budget in the t time slot, and D pool is the set of feature matrices corresponding to the to-be-selected sub-regions. A Bayesian convolutional neural network model fBCNN Complete the downstream classification task. The convolutional neural network is responsible for extracting the spatial information of spatio-temporal data. The parameters ω of the Bayesian neural network satisfy a distribution p(ω), rather than taking a specific value. The parameter distribution p(ω) can indicate the confidence level of the classification model. The more concentrated the parameter distribution is, the more confident the classification model is. The model parameters ω of the downstream classification model (target classification model) satisfy a distribution, ω ∼ p(ω). The set A of the feature matrices composed of the sub-regions to be collected is initially set to an empty set, that is The set A and D of sub-regions to be collected pool Similarly, its elements are feature matrices corresponding one-to-one to the data missing sub-regions rather than the data missing sub-regions themselves. Because the feature matrices and the data missing sub-regions are in one-to-one correspondence, the following steps will select the feature matrices of the data missing sub-regions. Next, the feature matrix of the nth sub-region to be collected will be selected in sequence, and the initial value of n is 1.
[0061] (2) Traverse the data set D of the sub-regions to be selected pool The feature matrix x of the unselected sub-regions in it, x ∈ D pool \A n-1 , in the set A n-1 After adding x to get the set A n-1 ∪{x}, calculate the score s of this set under the active acquisition strategy G that takes into account both parameter uncertainty and model performance x .
[0062] (3) Select the data x that makes the set A n-1 ∪{x} have the highest score s x as the feature matrix x of the sub-region to be collected selected in this round n :
[0063] (4) Update the set state, x n Add to the candidate set A n-1 Get A n , A n =A n-1 ∪{x n} and update n, n = n + 1.
[0064] (5) Compare the number n - 1 of the feature matrices of the selected sub-regions and the budget b at time slot t. If n - 1 < b, that is, there is still budget, then continue to select the feature matrix of the next sub-region and repeat the above steps. Otherwise, find the actual sub-region set to be collected through the selected set A b : P selected =position(A b ).
[0065] Based on the above analysis, step 103 involves selecting the desired sub-regions from all missing data sub-regions using a greedy approximation algorithm based on the feature matrix corresponding to each missing data sub-region. Specifically, this includes:
[0066] (b1) Combine each currently unselected data missing sub-region with all selected data missing sub-regions in the current set of sub-regions to be collected; initially, the set of sub-regions to be collected is empty.
[0067] (b2) Based on the feature matrix corresponding to each combination, the target classification model is applied to calculate the score of each combination; the score is a score that takes into account both the parameter uncertainty score of the target classification model and the model performance score.
[0068] (b3) Select the missing data sub-regions that were not selected from the highest-scoring combination and add them to the current set of sub-regions to be collected in order to update the current set of sub-regions to be collected.
[0069] (b4) Determine whether the number of selected data missing sub-regions in the current set of sub-regions to be collected has reached the preset number.
[0070] (b5) If so, then the selected data missing sub-regions in the current set of sub-regions to be collected are the sub-regions to be collected.
[0071] (b6) If not, return to step “Combine each currently unselected data missing sub-region with all selected data missing sub-regions in the current set of sub-regions to be collected”.
[0072] As an optional implementation, in step (b2), the score for each combination is calculated, s x =G(A n-1 ∪{x}), apply the active acquisition strategy G(D) to calculate A n-1 The score for ∪{x} measures the importance of the feature matrix set D to the downstream target classification model. The score is obtained by a weighted sum of two parts:
[0073] s x =G(D)=αG ω (D)+(1-α)G M (D)
[0074] Where α is a hyperparameter with a value of 0.8. G ω (D) represents the parameter uncertainty score, which quantifies the impact of the current set of spatiotemporal data D on the convergence speed of the model parameter ω:
[0075]
[0076] Where, D={(xi ,y i )|i=1,2,3…b},x i represents a feature matrix x i ; y i represents a feature matrix x i corresponding classification label; b represents the number of feature matrices in the feature matrix set D; D train refers to the original training set without D; H represents entropy; x 1:b represents x1,...,x i ,…,x b ; y 1:b represents y1,...,y i ,…,y b ; represents the entropy of the model parameters with respect to the expectation of the model prediction results, wherein the model prediction results are subject to the distribution p(y 1:b |x 1:b D train ).
[0077] G ω (D) In the expression, the first term H(ω|D train ) represents the entropy of the parameters before training the model using the information of the feature matrix set D, and the second term represents the entropy of the parameters after training the model using the information of the feature matrix set D, and the entropy of the parameters represents the degree of convergence of the parameters, and the difference between the entropies measures how much the parameters converge before and after training the model using the feature matrix set D, and G ω (D) represents the contribution of the spatiotemporal data D to the convergence of the model parameters ω.
[0078] Because the parameters in the target classification model are often more, in order to facilitate calculation, the following equivalent formula is used to calculate G ω (D):
[0079]
[0080] wherein H(ω|y 1:b ,x 1:b ,D train ) and H(y 1:b |x 1:b ,ω,D train ) have different meanings. H(ω|y 1:b ,x 1:b ,D train ) is the entropy of the parameters ω after training the model using the information of the feature matrix set D, and H(y 1:b |x 1:b ,ω,D trainH(ω|D) is the entropy of the model's prediction result after training the model using information from the feature matrix set D. Similarly, H(ω|D) is the entropy of the model's prediction result. train ) and H(y 1:b |x 1:b D train The meanings of ) are different. H(ω|D train H(y) is the entropy of the parameter ω calculated before training the model using information from the feature matrix set D. 1:b |x 1:b D train () is the entropy of the model's prediction results calculated before training the model using information from the feature matrix set D. Because G ω (D) The final calculation results (calculation difference) of the first and second calculation methods are exactly the same, both of which are in calculating y 1:b The mutual information between ω and ω. The second formula is easier to calculate, so it's used to ensure the equivalent results. Simply put, measuring model convergence speed requires calculating the entropy of the parameters. To simplify calculation, an equivalent transformation is performed, converting the result to calculating the entropy of the model's prediction results. The numerical values of the calculated results are equivalent.
[0081] G M (D) represents the probability marginal score, which quantifies the difficulty for the target classification model to infer the sample classification label based on the current set of feature matrices D. It represents the contribution of the data in feature matrix D to the current performance improvement of the target classification model. When the target classification model has difficulty inferring the label of the data based on the information in feature matrix D, it indicates that the target classification model needs to learn the data in feature matrix D to improve its performance when processing relevant data. This value can be determined by calculating the margin between the probability values estimated by the target classification model:
[0082]
[0083] Among them, f BCNN (x i ) max =p(y max |ω);f BCNN (x i ) 2-max =p(y 2-max |ω).
[0084] Among them, f BCNN It's an object classification model, specifically a Bayesian convolutional neural network model. max and y 2-max To correspond to the target classification model for data x i The labels with the highest and second highest predicted probability values.
[0085] Therefore, for step (b2), the score of each combination is calculated according to the corresponding feature matrix of each combination by applying the target classification model, specifically including:
[0086] (b21) For each combination, the entropy of the model parameters of the target classification model before being trained by the feature matrix corresponding to the combination is calculated to obtain a first model parameter entropy; the feature matrix corresponding to each combination has a corresponding preset classification label. In other words, for each combination, the entropy of the model prediction result of the target classification model before being trained by the feature matrix corresponding to the combination is calculated to obtain a first model prediction result entropy.
[0087] (b22) For each combination, the entropy of the model parameters of the target classification model after being trained by the feature matrix corresponding to the combination is calculated to obtain a second model parameter entropy. In other words, for each combination, the entropy of the model prediction result of the target classification model after being trained by the feature matrix corresponding to the combination is calculated to obtain a second model prediction result entropy.
[0088] (b23) The model parameter uncertainty score is calculated according to the first model parameter entropy and the second model parameter entropy. In other words, the model parameter uncertainty score is calculated according to the first model prediction result entropy and the second model prediction result entropy.
[0089] (b24) For each combination, the feature matrix corresponding to the combination is input into the target classification model to obtain the highest prediction probability result and the second highest prediction probability result of each data missing sub-region in the combination.
[0090] (b25) The probability margin score corresponding to each combination is calculated according to the highest prediction probability result and the second highest prediction probability result of each data missing sub-region in the combination.
[0091] (b26) The score of each combination is obtained according to the model parameter uncertainty score and the probability margin score corresponding to each combination.
[0092] In this embodiment, on the one hand, the active acquisition function G considering the parameter uncertainty and the model performance is used to measure the value of a group of data missing sub-regions. When measuring the value of the data missing sub-region, the change of the model parameter uncertainty and the model performance before and after the data missing sub-region is considered, and the group of data missing sub-regions that can most improve the convergence speed and the model performance of the model is selected for sensing. On the other hand, the greedy approximation of the data missing sub-region selection is implemented. In order to select the group of data missing sub-regions with the highest value, each combination of the group of data missing sub-regions needs to be evaluated, which is an NP-hard problem and needs to be solved by an approximate method. Because the active acquisition strategy G is a submodular function, the greedy point selection method is used to approximate the selection of the group of data missing sub-regions, and the greedy approximation of the submodular function can achieve 1-1 / e approximation, which approximately solves the NP-hard problem and ensures the accuracy.
[0093] The sensing region selection method of this embodiment can solve the shortcomings of the existing sensing region selection method.
[0094] (1) Multi-point joint evaluation: the active acquisition strategy considering the parameter uncertainty and the model performance is used to measure the value of a group of data missing sub-regions, which can effectively reduce the information overlap problem in the combination caused by selecting the top k data missing sub-regions as the group of data missing sub-regions to be collected for single-point evaluation, and the value of a group of data missing sub-regions is jointly evaluated in this application, thereby reducing the information overlap in the combination of data missing sub-regions.
[0095] (2) Performance guarantee of approximate implementation of NP-hard problem: because the active acquisition function considering the parameter uncertainty and the model performance is a submodular function, there is a theoretical guarantee when approximately solving the NP-hard problem of the combination of data missing sub-regions. The greedy approximation of the submodular function is 1-1 / e approximation.
[0096] (3) Considering the downstream task in the selection of data missing sub-regions: the active acquisition strategy considering the parameter uncertainty and the model performance considers the influence of the data missing sub-region on the convergence speed and the performance improvement of the downstream classification model when measuring the value of the data missing sub-region. Therefore, the selected data missing sub-region is the most valuable for the downstream task, improves the pertinence of the selection of the data missing sub-region, and can obtain more valuable data under the limited budget.
[0097] (4) Data preprocessing when applying the active learning method in crowd-sensing: by processing the sparse data in sparse crowd-sensing, a set of data missing sub-regions and their corresponding feature matrix are obtained, and the feature matrix is used to construct the data set to be selected. While constructing the data set to be selected by the active learning method, the spatial information of the data missing sub-regions and the data of the remaining known sub-regions are retained. An efficient and effective data preprocessing method is provided for applying the active learning method in the sparse crowd-sensing framework.
[0098] The application also provides an application scenario of the above-mentioned sensing area selection method in sparse crowd-sensing. Specifically, the sensing area selection method in sparse crowd-sensing provided in this embodiment can be applied in an air quality data classification scenario. The scenario includes a data acquisition link, an air quality classification model training link, and an air quality classification link. The data acquisition link is used to acquire air quality data in a target area. The sensing area selection method in sparse crowd-sensing provided in this embodiment belongs to the data acquisition link. Specifically, in the process of acquiring air quality data based on sparse crowd-sensing, the sensing area is reasonably selected, so that more valuable and more beneficial training data for air quality classification are acquired.
[0099] The application also provides an application scenario of the above-mentioned sensing area selection method in sparse crowd-sensing. Specifically, the sensing area selection method in sparse crowd-sensing provided in this embodiment can be applied in a traffic flow data classification scenario. The scenario includes a data acquisition link, a traffic flow classification model training link, and a traffic flow classification link. The data acquisition link is used to acquire traffic flow data in a target area. The sensing area selection method in sparse crowd-sensing provided in this embodiment belongs to the data acquisition link. Specifically, in the process of acquiring traffic flow data based on sparse crowd-sensing, the sensing area is reasonably selected, so that more valuable and more beneficial training data for traffic flow classification are acquired.
[0100] The application also provides an application scenario of the above-mentioned sensing area selection method in sparse crowd-sensing. Specifically, the sensing area selection method in sparse crowd-sensing provided in this embodiment can be applied in a wind speed data classification scenario. The scenario includes a data acquisition link, a wind speed classification model training link, and a wind speed classification link. The data acquisition link is used to acquire wind speed data in a target area. The sensing area selection method in sparse crowd-sensing provided in this embodiment belongs to the data acquisition link. Specifically, in the process of acquiring wind speed data based on sparse crowd-sensing, the sensing area is reasonably selected, so that more valuable and more beneficial training data for wind speed classification are acquired.
[0101] Embodiment 2
[0102] AsFigures 2 to 4 As shown, the embodiment provides a data classification method, which is specifically an air quality data classification method, and the air quality data classification method comprises:
[0103] In step 201, historical spatio-temporal data in a target region and corresponding classification labels are acquired to construct an initial training data set. The historical spatio-temporal data refers to air quality historical spatio-temporal data before time t. The classification labels include air quality good, fair and poor. The classification labels are pre-labeled by artificial experts according to collected air quality data.
[0104] In step 202, a target classification model is trained by using the current training data set.
[0105] In step 203, it is determined whether the performance of the target classification model after training meets a preset performance requirement.
[0106] In step 204, if yes, a trained target classification model is obtained for data classification. In the embodiment, the target classification model is an air quality classification model, and specifically a Bayesian convolutional neural network model.
[0107] In step 205, if no, based on sparse spatio-temporal data at time t in the target region, the perception region selection method in sparse crowd-sensing described in Embodiment 1 is executed to obtain each to-be-collected sub-region.
[0108] In step 206, according to a data acquisition mode of sparse crowd-sensing, spatio-temporal data of each to-be-collected sub-region is acquired, which is specifically air quality data of the to-be-collected sub-region.
[0109] The crowd-sensing platform publishes detailed information such as the location P selected of the task, time requirements, sensing data types to the sensing employees. The sensing employees select the task, execute the task and upload the data. The crowd-sensing platform pushes the task to the sensing employees or the employees can browse the selectable tasks and select to participate. The sensing employees confirm to accept the task and obtain detailed requirements for executing the task (required sensing data location, time requirements, sensing data types). The sensing employees collect data using sensing devices at the time and location specified in the task The sensing employees upload the collected data to the crowd-sensing platform.
[0110] In step 207, the spatio-temporal data of the to-be-collected sub-region is added to the sparse spatio-temporal data at time t to obtain training data at time t, which is specifically air quality training data. The classification labels of the training data at time t are artificially labeled and defined.
[0111] The data at time t is updated X t is handed over to human experts for labeling to obtain corresponding labels Yt .
[0112] Step 208, add the t time training data to the initial training data set to obtain an updated training data set. The updated training data set D train = D train ∪ {(X t , Y t )}.
[0113] Step 209, take the current updated training data set as the current training data set, and return to the step of "training the target classification model with the current training data set".
[0114] In step 205, based on the sparse spatio-temporal data in the target region at t time, the perception region selection method in the sparse crowd-sensing described in embodiment 1 is performed to obtain each to-be-collected sub-region. Specifically:
[0115] Step 101, obtain the sparse spatio-temporal data in the target region at t time, specifically the air quality data at t time; the target region includes a plurality of sub-regions.
[0116] Step 102, pre-process the sparse spatio-temporal data to obtain a feature matrix corresponding to each data missing sub-region; the feature matrix includes air quality inference data corresponding to a data missing sub-region at a position in the feature matrix and the sparse spatio-temporal data; a data missing sub-region refers to a sub-region for which air quality data has not been obtained.
[0117] Step 103, according to the feature matrix corresponding to each data missing sub-region, apply a greedy approximation algorithm to select each to-be-collected sub-region from all data missing sub-regions.
[0118] As an optional implementation, in step 102, the pre-processing of the sparse spatio-temporal data to obtain a feature matrix corresponding to each data missing sub-region specifically includes:
[0119] (a1) determining a data missing sub-region according to the sparse spatio-temporal data.
[0120] (a2) according to the data missing sub-region, representing the sparse spatio-temporal data in matrix form to obtain a sparse spatio-temporal data matrix; in the sparse spatio-temporal data matrix, the element at the position corresponding to the data missing sub-region is 0, and the element at the position corresponding to the data non-missing sub-region is the actually collected air quality data.
[0121] (a3) according to the actually collected data in the sparse spatio-temporal data matrix, inferring the data of the data missing sub-region to obtain the air quality inference data corresponding to the data missing sub-region.
[0122] (a4) constructing an auxiliary matrix for each data missing sub-region; the auxiliary matrix comprises the air quality inference data at the position corresponding to the data missing sub-region; in the auxiliary matrix, the element at the position corresponding to the data missing sub-region is the air quality inference data, and the elements at other positions are 0.
[0123] (a5) deriving a feature matrix corresponding to each data missing sub-region according to the auxiliary matrix and the sparse spatio-temporal data matrix.
[0124] As an optional implementation, in step 103, the greedy approximation algorithm is applied to select the to-be-collected sub-regions from all the data missing sub-regions according to the feature matrix corresponding to each data missing sub-region, and specifically includes:
[0125] (b1) combining each unselected data missing sub-region with all the selected data missing sub-regions in the current to-be-collected sub-region set; initially, the to-be-collected sub-region set is an empty set; initially, the unselected data missing sub-region is all the data missing sub-regions. Any unselected data missing sub-region is combined with all the selected data missing sub-regions in the current to-be-collected sub-region set to obtain a combination, and each unselected data missing sub-region corresponds to a combination after combination.
[0126] (b2) calculating the score of each combination according to the feature matrix corresponding to the combination by applying the target classification model (air quality classification model); the score is a score considering the parameter uncertainty score and the model performance of the target classification model.
[0127] (b3) selecting the unselected data missing sub-region in the combination with the highest score to join the current to-be-collected sub-region set to update the current to-be-collected sub-region set.
[0128] (b4) determining whether the number of selected data missing sub-regions in the current to-be-collected sub-region set reaches a preset number.
[0129] (b5) if yes, the selected data missing sub-regions in the current to-be-collected sub-region set are the to-be-collected sub-regions.
[0130] (b6) if no, returning to the step of combining each unselected data missing sub-region with all the selected data missing sub-regions in the current to-be-collected sub-region set.
[0131] In step (b2), the score of each combination is calculated according to the feature matrix corresponding to the combination by applying the target classification model (air quality classification model), and specifically includes:
[0132] (b21) calculating, for each combination, an entropy of model parameters of the target classification model before the model parameters are trained by the feature matrix corresponding to the combination, to obtain a first model parameter entropy; the feature matrix corresponding to each combination has a corresponding preset classification label.
[0133] (b22) calculating, for each combination, an entropy of model parameters of the target classification model after the model parameters are trained by the feature matrix corresponding to the combination, to obtain a second model parameter entropy.
[0134] (b23) calculating a model parameter uncertainty score according to the first model parameter entropy and the second model parameter entropy.
[0135] (b24) inputting, for each combination, the feature matrix corresponding to the combination into the target classification model, to obtain a highest prediction probability result and a second highest prediction probability result of each data missing sub-region in the combination.
[0136] (b25) calculating a probability margin score corresponding to each combination according to the highest prediction probability result and the second highest prediction probability result of each data missing sub-region in the combination.
[0137] (b26) obtaining a score of each combination according to the model parameter uncertainty score and the probability margin score corresponding to each combination.
[0138] In this embodiment, the air quality data in the target region is acquired by using the data acquisition method of sparse crowd-sensing to construct training data, and a wind speed size classification model is trained. In the process of acquiring the air quality data in the target region by using the data acquisition method of sparse crowd-sensing, for the selection of the sensing region, in this application, a greedy approximation algorithm is used to select the sensing region from all data missing sub-regions, which can effectively reduce the information overlap problem in the combination caused by selecting the top k high-score sub-regions as the to-be-collected sub-regions in the existing sensing region selection method; in addition, an active collection strategy considering the parameter uncertainty and the model performance of the classification model is used to measure the value (score) of each to-be-collected sub-region, which solves the NP-hard problem of the existing sensing region selection, and when considering the parameter uncertainty and the model performance of the classification model, the influence of the sub-region on the convergence speed and performance improvement of the target classification model is considered, and the selected sub-region is the most valuable for the classification task, which improves the pertinence of the data missing sub-region selection and can acquire more valuable data under the limited budget. Therefore, by using the sensing region selection method in the sparse crowd-sensing in this embodiment, a region more conducive to air quality classification can be acquired, more valuable air quality data can be acquired, and the training effect of the air quality classification model is improved, and thus the classification precision in air quality classification is improved.
[0139] Embodiment 3
[0140] As Figures 2 to 4 shown in the embodiment, a data classification method is provided, which is specifically a traffic flow data classification method. The traffic flow data classification method comprises the following steps:
[0141] In step 201, historical spatio-temporal data in a target area and corresponding classification labels are acquired to construct an initial training data set. The historical spatio-temporal data refers to traffic flow historical spatio-temporal data before time t. The classification labels include traffic peak period, traffic off-peak period, etc. The classification labels are manually labeled by experts according to the collected traffic flow data.
[0142] In step 202, a target classification model is trained using the current training data set.
[0143] In step 203, it is determined whether the performance of the trained target classification model meets the preset performance requirement.
[0144] In step 204, if yes, a trained target classification model is obtained for data classification. In the embodiment, the target classification model is a traffic flow classification model, and a Bayesian convolutional neural network model is specifically used.
[0145] In step 205, if no, based on sparse spatio-temporal data at time t in the target area, the perception area selection method in sparse crowd-sensing described in Embodiment 1 is executed to obtain each to-be-collected sub-area.
[0146] In step 206, according to the data acquisition mode of sparse crowd-sensing, spatio-temporal data of each to-be-collected sub-area is acquired, which is specifically traffic flow data of the to-be-collected sub-area.
[0147] The crowd-sensing platform publishes detailed information such as the location P selected , time requirement, and sensing data type of the task to the sensing employees. The sensing employees select the task, execute the task, and upload the data. The crowd-sensing platform pushes the task to the sensing employees or the employees can browse the selectable tasks and select to participate. The sensing employees confirm to accept the task and obtain the detailed requirements for executing the task (the required sensing data location, time requirement, and sensing data type). The sensing employees collect data using the sensing device at the time and location specified in the task The sensing employees upload the collected data to the crowd-sensing platform.
[0148] In step 207, the spatio-temporal data of the to-be-collected sub-area is added to the sparse spatio-temporal data at time t to obtain training data at time t. The classification labels of the training data at time t are manually labeled and defined.
[0149] The data at time t is updated X tHand over to human experts for labeling to the corresponding label Y t .
[0150] Step 208, add the t time training data to the initial training data set to obtain an updated training data set. The updated training data set D train = D train ∪ {(X t , Y t )}.
[0151] Step 209, take the current updated training data set as the current training data set, and return to the step of "training the target classification model with the current training data set".
[0152] In step 205, based on the sparse spatio-temporal data in the target region at t time, the perception region selection method in the sparse crowd-sensing described in embodiment 1 is performed to obtain each to-be-collected sub-region. Specifically:
[0153] Step 101, obtain the sparse spatio-temporal data in the target region at t time, specifically the traffic flow data at t time; the target region includes a plurality of sub-regions.
[0154] Step 102, pre-process the sparse spatio-temporal data to obtain a feature matrix corresponding to each data missing sub-region; the feature matrix includes traffic flow inference data at a position corresponding to a data missing sub-region and the sparse spatio-temporal data; a data missing sub-region refers to a sub-region for which traffic flow data is not obtained.
[0155] Step 103, according to the feature matrix corresponding to each data missing sub-region, a greedy approximation algorithm is applied to select each to-be-collected sub-region from all data missing sub-regions.
[0156] As an optional implementation, in step 102, the pre-processing of the sparse spatio-temporal data to obtain the feature matrix corresponding to each data missing sub-region specifically includes:
[0157] (a1) determining a data missing sub-region according to the sparse spatio-temporal data.
[0158] (a2) according to the data missing sub-region, representing the sparse spatio-temporal data in matrix form to obtain a sparse spatio-temporal data matrix; in the sparse spatio-temporal data matrix, the element at the position corresponding to the data missing sub-region is 0, and the element at the position corresponding to the data non-missing sub-region is the actually collected traffic flow data.
[0159] (a3) according to the actually collected data in the sparse spatio-temporal data matrix, inferring the data of the data missing sub-region to obtain the traffic flow inference data corresponding to the data missing sub-region.
[0160] (a4) constructing an auxiliary matrix for each data missing sub-region; the auxiliary matrix comprises traffic flow inference data at a position corresponding to the data missing sub-region; in the auxiliary matrix, an element at the position corresponding to the data missing sub-region is the traffic flow inference data, and elements at other positions are 0;
[0161] (a5) obtaining a feature matrix corresponding to each data missing sub-region according to the auxiliary matrix and the sparse space-time data matrix.
[0162] As an optional implementation, in step 103, according to the feature matrix corresponding to each data missing sub-region, a greedy approximation algorithm is applied to select each to-be-collected sub-region from all data missing sub-regions, and specifically includes:
[0163] (b1) combining each unselected data missing sub-region with all selected data missing sub-regions in the current to-be-collected sub-region set; initially, the to-be-collected sub-region set is an empty set; initially, the unselected data missing sub-region is all data missing sub-regions. Any unselected data missing sub-region is combined with all selected data missing sub-regions in the current to-be-collected sub-region set to obtain a combination, and each unselected data missing sub-region corresponds to a combination after combination.
[0164] (b2) according to the feature matrix corresponding to each combination, applying a target classification model (traffic flow classification model) to calculate the score of each combination; the score is a score considering the parameter uncertainty score and the model performance of the target classification model.
[0165] (b3) selecting an unselected data missing sub-region in the combination with the highest score to join the current to-be-collected sub-region set to update the current to-be-collected sub-region set.
[0166] (b4) determining whether the number of selected data missing sub-regions in the current to-be-collected sub-region set reaches a preset number.
[0167] (b5) if yes, the selected data missing sub-regions in the current to-be-collected sub-region set are each to-be-collected sub-region.
[0168] (b6) if no, returning to the step of combining each unselected data missing sub-region with all selected data missing sub-regions in the current to-be-collected sub-region set.
[0169] In step (b2), according to the feature matrix corresponding to each combination, the target classification model (traffic flow classification model) is applied to calculate the score of each combination, specifically including:
[0170] (b21) calculating, for each combination, an entropy of model parameters of the target classification model before the model parameters are trained by the feature matrix corresponding to the combination, to obtain a first model parameter entropy; the feature matrix corresponding to each combination has a corresponding preset classification label, such as a peak period or a low period.
[0171] (b22) calculating, for each combination, an entropy of model parameters of the target classification model after the model parameters are trained by the feature matrix corresponding to the combination, to obtain a second model parameter entropy.
[0172] (b23) calculating a model parameter uncertainty score according to the first model parameter entropy and the second model parameter entropy.
[0173] (b24) inputting, for each combination, the feature matrix corresponding to the combination into the target classification model, to obtain a highest prediction probability result and a second highest prediction probability result of each data missing sub-region in the combination.
[0174] (b25) calculating a probability margin score corresponding to each combination according to the highest prediction probability result and the second highest prediction probability result of each data missing sub-region in the combination.
[0175] (b26) obtaining a score of each combination according to the model parameter uncertainty score and the probability margin score corresponding to each combination.
[0176] In the embodiment, traffic flow data in a target region is acquired by using a sparse crowd-sensing data acquisition method to construct training data, and a traffic flow classification model is trained. In the process of acquiring the traffic flow data in the target region by using the sparse crowd-sensing data acquisition method, the greedy approximation algorithm is used to select a sensing region from all data missing sub-regions in the present application, which can effectively reduce the information overlap problem in the combination caused by selecting the top k high-score sub-regions as the to-be-collected sub-regions in the prior art. In addition, the active collection strategy considering the parameter uncertainty and the model performance of the classification model is used to measure the value (score) of each to-be-collected sub-region, which solves the NP-hard problem of the prior art of sensing region selection, and when considering the parameter uncertainty and the model performance of the classification model, the influence of the sub-region on the convergence speed and the performance improvement of the target classification model is considered, the selected sub-region is the most valuable for the classification task, the pertinence of the data missing sub-region selection is improved, and more valuable data can be acquired under a limited budget. Therefore, the sensing region selection method in the sparse crowd-sensing in the embodiment can acquire a region more conducive to traffic flow classification, can acquire more valuable traffic flow data, and thus improves the training effect of the traffic flow classification model and further improves the classification accuracy in traffic flow size classification.
[0177] Embodiment 4
[0178] As Figures 2 to 4 shown, the embodiment provides a data classification method, specifically a wind speed data classification method, which comprises the following steps:
[0179] Step 201, obtaining historical spatio-temporal data in a target area and corresponding classification labels to construct an initial training data set; wherein the historical spatio-temporal data refers to wind speed historical spatio-temporal data before t time; the classification labels include large wind speed, medium wind speed, small wind speed, etc. The classification labels are pre-labeled by artificial experts according to the collected wind speed data.
[0180] Step 202, training a target classification model using the current training data set.
[0181] Step 203, determining whether the performance of the current trained target classification model meets the preset performance requirement.
[0182] Step 204, if yes, obtaining the trained target classification model for data classification. In this embodiment, the target classification model is a wind speed size classification model, and a Bayesian convolutional neural network model is specifically used.
[0183] Step 205, if no, based on the sparse spatio-temporal data at t time in the target area, performing the perception area selection method in the sparse crowd-sensing as described in Embodiment 1 to obtain each to-be-collected sub-area.
[0184] Step 206, obtaining the spatio-temporal data of each to-be-collected sub-area according to the data acquisition mode of the sparse crowd-sensing, specifically the wind speed data of the to-be-collected sub-area.
[0185] The crowd-sensing platform publishes detailed information such as the location P selected , time requirement, and sensing data type of the task to the sensing employees. The sensing employees select the task, perform the task, and upload the data. The crowd-sensing platform pushes the task to the sensing employees or the employees can browse the selectable tasks and select to participate. The sensing employees confirm to accept the task and obtain the detailed requirements for performing the task (the required sensing data location, time requirement, and sensing data type). The sensing employees collect data using the sensing device at the time and location specified in the task The sensing employees upload the collected data to the crowd-sensing platform.
[0186] Step 207, adding the spatio-temporal data of the to-be-collected sub-area to the sparse spatio-temporal data at t time to obtain the training data at t time; the classification labels of the training data at t time are artificially labeled and defined.
[0187] Update the data at t time Xt The corresponding label Y handed over to a human expert for annotation t .
[0188] Step 208, add the t time training data to the initial training data set to obtain an updated training data set. The updated training data set D train = D train ∪ {(X t , Y t )}.
[0189] Step 209, take the current updated training data set as the current training data set, and return to the step of "training the target classification model with the current training data set".
[0190] In step 205, based on the sparse spatio-temporal data in the target region at t time, the perception region selection method in the sparse crowd-sensing described in embodiment 1 is performed to obtain each to-be-collected sub-region. Specifically:
[0191] Step 101, obtain the sparse spatio-temporal data in the target region at t time, specifically the wind speed data at t time; the target region includes a plurality of sub-regions.
[0192] Step 102, pre-process the sparse spatio-temporal data to obtain a feature matrix corresponding to each data missing sub-region; the feature matrix includes wind speed inference data at a position corresponding to a data missing sub-region and the sparse spatio-temporal data; a data missing sub-region refers to a sub-region for which wind speed data has not been obtained.
[0193] Step 103, according to the feature matrix corresponding to each data missing sub-region, apply a greedy approximation algorithm to select each to-be-collected sub-region from all data missing sub-regions.
[0194] As an optional implementation, in step 102, the pre-processing of the sparse spatio-temporal data to obtain a feature matrix corresponding to each data missing sub-region specifically includes:
[0195] (a1) determining a data missing sub-region according to the sparse spatio-temporal data.
[0196] (a2) representing the sparse spatio-temporal data in matrix form according to the data missing sub-region to obtain a sparse spatio-temporal data matrix; in the sparse spatio-temporal data matrix, the element at the position corresponding to the data missing sub-region is 0, and the element at the position corresponding to the data non-missing sub-region is the actually collected wind speed data.
[0197] (a3) inferring the data of the data missing sub-region according to the actually collected data in the sparse spatio-temporal data matrix to obtain wind speed inference data corresponding to the data missing sub-region.
[0198] (a4) constructing an auxiliary matrix for each data missing sub-region; the auxiliary matrix comprises wind speed inference data at a position corresponding to a data missing sub-region; in the auxiliary matrix, an element at a position corresponding to a data missing sub-region is wind speed inference data, and elements at other positions are 0.
[0199] (a5) obtaining a feature matrix corresponding to each data missing sub-region according to the auxiliary matrix and the sparse space-time data matrix.
[0200] As an optional implementation, in step 103, the greedy approximation algorithm is applied to select each to-be-collected sub-region from all data missing sub-regions according to the feature matrix corresponding to each data missing sub-region, and specifically includes:
[0201] (b1) combining each unselected data missing sub-region with all selected data missing sub-regions in the current to-be-collected sub-region set; initially, the to-be-collected sub-region set is an empty set; initially, the unselected data missing sub-region is all data missing sub-regions. Any unselected data missing sub-region is combined with all selected data missing sub-regions in the current to-be-collected sub-region set to obtain a combination, and each unselected data missing sub-region corresponds to a combination after combination.
[0202] (b2) calculating a score of each combination according to the feature matrix corresponding to the combination by applying a target classification model (wind speed size classification model); the score is a score considering the parameter uncertainty of the target classification model and the score of the model performance.
[0203] (b3) adding the unselected data missing sub-region in the combination with the highest score to the current to-be-collected sub-region set to update the current to-be-collected sub-region set.
[0204] (b4) determining whether the number of selected data missing sub-regions in the current to-be-collected sub-region set reaches a preset number.
[0205] (b5) if yes, the selected data missing sub-regions in the current to-be-collected sub-region set are each to-be-collected sub-region.
[0206] (b6) if no, returning to step “combining each unselected data missing sub-region with all selected data missing sub-regions in the current to-be-collected sub-region set”.
[0207] In step (b2), the score of each combination is calculated according to the feature matrix corresponding to the combination by applying a target classification model (wind speed size classification model), and specifically includes:
[0208] (b21) calculating, for each combination, an entropy of model parameters of the target classification model before the model parameters are trained by the feature matrix corresponding to the combination, to obtain a first model parameter entropy; the feature matrix corresponding to each combination has a corresponding preset classification label.
[0209] (b22) calculating, for each combination, an entropy of model parameters of the target classification model after the model parameters are trained by the feature matrix corresponding to the combination, to obtain a second model parameter entropy.
[0210] (b23) calculating a model parameter uncertainty score according to the first model parameter entropy and the second model parameter entropy.
[0211] (b24) inputting, for each combination, the feature matrix corresponding to the combination into the target classification model, to obtain a highest prediction probability result and a second highest prediction probability result of each data missing sub-region in the combination.
[0212] (b25) calculating a probability margin score corresponding to each combination according to the highest prediction probability result and the second highest prediction probability result of each data missing sub-region in the combination.
[0213] (b26) obtaining a score of each combination according to the model parameter uncertainty score and the probability margin score corresponding to each combination.
[0214] In the embodiment, the wind speed data in the target region is acquired by using the data acquisition method of sparse crowd-sensing, and training data is constructed to train the wind speed size classification model. In the process of acquiring the wind speed data in the target region by using the data acquisition method of sparse crowd-sensing, the greedy approximation algorithm is used to select the sensing region from all data missing sub-regions in the present application, which can effectively reduce the information overlap problem in the combination caused by selecting the top k high-score sub-regions as the to-be-collected sub-regions in the prior art; in addition, the active collection strategy considering the parameter uncertainty and the model performance of the classification model is used to measure the value (score) of each to-be-collected sub-region, which solves the NP-hard problem of the prior art of sensing region selection, and when considering the parameter uncertainty and the model performance of the classification model, the influence of the sub-region on the convergence speed and performance improvement of the target classification model is considered, the selected sub-region is the most valuable for the classification task, the pertinence of the data missing sub-region selection is improved, and more valuable data can be acquired under the limited budget. Therefore, the sensing region selection method in the sparse crowd-sensing in the embodiment can acquire a region more conducive to wind speed classification, and can acquire more valuable wind speed data, thereby improving the training effect of the wind speed size classification model and further improving the classification precision in wind speed size classification.
[0215] Embodiment 5
[0216] In this embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in the above method embodiments.
[0217] Embodiment 6
[0218] In this embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.
[0219] Embodiment 7
[0220] In this embodiment, a computer program product is provided, which comprises a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.
[0221] The technical features of the above embodiments can be combined in any manner. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, but it should be considered that any combination of the technical features is within the scope of the present disclosure, as long as there is no contradiction.
[0222] The principles and implementation modes of the present application are described by using specific examples herein, and the above embodiments are only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, the specific implementation modes and application ranges can be changed according to the idea of the present application. In conclusion, the content of the present application should not be understood as a limitation.
Claims
1. A method for selecting a perception region in sparse crowd sensing, characterized in that, The method for selecting the sensing region in sparse crowd sensing includes: Acquire sparse spatiotemporal data at time t within a target region; the target region includes several sub-regions; The sparse spatiotemporal data is preprocessed to obtain a feature matrix corresponding to each data-missing sub-region. The feature matrix includes inferred data at the corresponding position of a data-missing sub-region and the sparse spatiotemporal data. A data-missing sub-region refers to a sub-region where no data has been obtained. Based on the feature matrix corresponding to each missing data sub-region, a greedy approximation algorithm is applied to select each sub-region to be collected from all missing data sub-regions. Specifically, based on the feature matrix corresponding to each missing data sub-region, a greedy approximation algorithm is applied to select each sub-region to be collected from all missing data sub-regions, including: Each currently unselected missing data sub-region is combined with all selected missing data sub-regions in the current set of sub-regions to be collected; initially, the set of sub-regions to be collected is empty. Based on the feature matrix corresponding to each combination, the target classification model is applied to calculate the score of each combination; the score is a score that takes into account both the parameter uncertainty score of the target classification model and the model performance. Select the missing data sub-regions from the highest-scoring combination that were not selected and add them to the current set of sub-regions to be collected to update the current set of sub-regions to be collected; Determine whether the number of selected data-missing sub-regions in the current set of sub-regions to be collected has reached a preset number; If so, then the selected data-missing sub-regions in the current set of sub-regions to be collected are the respective sub-regions to be collected; If not, return to step "Combine each currently unselected missing data sub-region with all selected missing data sub-regions in the current set of sub-regions to be collected"; Specifically, based on the feature matrix corresponding to each combination, a target classification model is applied to calculate the score for each combination, including: For each combination, the entropy of the model parameters of the target classification model before it was trained by the feature matrix corresponding to the combination is calculated to obtain the first model parameter entropy; the feature matrix corresponding to each combination has a corresponding preset classification label; For each combination, the entropy of the model parameters of the target classification model after it has not been trained with the feature matrix corresponding to the combination is calculated to obtain the second model parameter entropy; Calculate the model parameter uncertainty score based on the first model parameter entropy and the second model parameter entropy; For each combination, the feature matrix corresponding to the combination is input into the target classification model to obtain the highest prediction probability result and the second highest prediction probability result for each data missing sub-region in the combination; Calculate the probability marginal score for each combination based on the highest and second highest prediction probability results for each data missing sub-region in the combination. The score for each combination is derived based on the uncertainty score of the model parameters and the marginal probability score corresponding to each combination.
2. The method for selecting the sensing region in sparse swarm intelligence sensing according to claim 1, characterized in that, The sparse spatiotemporal data is preprocessed to obtain the feature matrix corresponding to each data missing sub-region, specifically including: Based on the sparse spatiotemporal data, determine the data missing sub-regions; Based on the data missing sub-regions, the sparse spatiotemporal data is represented in matrix form to obtain a sparse spatiotemporal data matrix; in the sparse spatiotemporal data matrix, the elements at the positions corresponding to the data missing sub-regions are 0, and the elements at the positions corresponding to the data not missing sub-regions are the actual collected data. Based on the actual collected data in the sparse spatiotemporal data matrix, the data of the missing data sub-region is inferred to obtain the inferred data corresponding to the missing data sub-region. An auxiliary matrix is constructed for each data missing sub-region; the auxiliary matrix includes the inferred data at the position corresponding to the data missing sub-region; in the auxiliary matrix, the element at the position corresponding to the data missing sub-region is the inferred data, and the element at other positions is 0; The feature matrix corresponding to each data missing sub-region is derived based on the auxiliary matrix and the sparse spatiotemporal data matrix.
3. The method for selecting the sensing region in sparse swarm intelligence sensing according to claim 1, characterized in that, The expression for the score of each combination is: s=αG ω (D)+(1-α)G M (D); in, In the formula, s represents the score; G ω (D) represents the uncertainty score of the model parameters of the feature matrix set D corresponding to the combination; G M (D) represents the probability marginal score of the feature matrix set D corresponding to the combination; α represents the hyperparameter; D = {(x i ,y i |i=1,2,3…b};x i Describe the characteristic matrix x in the characteristic matrix set D i ;y i Describe the characteristic matrix x in the characteristic matrix set D i The corresponding category label; b represents the number of feature matrices in the feature matrix set D; H(y 1:b |x 1:b D train ) represents the entropy of the prediction result of the first model; x 1:b Representing x1,...,x i ,…,x b ;y 1:b Representing y1,...,y i ,…,y b H(y) 1:b |x 1:b ,ω,D train ) represents the entropy of the second model's prediction result; Let p(ω|D) represent the expected value of the entropy predicted by the model with respect to the model parameters, where the model parameters ω follow a distribution p(ω|D). train );D train This refers to the original training set that does not contain D; f BCNN (x i ) max and f BCNN (x i ) 2-max Let x represent the feature matrix x corresponding to the i-th missing data sub-region in the combination. i After being input into the target classification model, the model outputs the highest and second highest predicted probability results.
4. A data classification method, characterized in that, The data classification method includes: Acquire historical spatiotemporal data and corresponding classification labels within the target area to construct an initial training dataset; Train the target classification model using the current training dataset; Determine whether the performance of the currently trained target classification model meets the preset performance requirements; If so, then the trained target classification model is obtained for data classification; If not, then based on the sparse spatiotemporal data at time t within the target area, the perception area selection method in sparse swarm sensing as described in any one of claims 1 to 3 is executed to obtain each sub-region to be collected. Based on the data acquisition mode of the collective intelligence perception, the spatiotemporal data of each of the sub-regions to be collected are acquired; The spatiotemporal data of the sub-region to be collected is added to the sparse spatiotemporal data at time t to obtain the training data at time t; the classification labels of the training data at time t are predefined manually. The training data at time t is added to the initial training data set to obtain the updated training dataset; Using the currently updated training dataset as the current training data set, return to the step "Train the target classification model using the current training data set".
5. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the perception region selection method in sparse swarm intelligence sensing according to any one of claims 1-3 or the data classification method according to claim 4.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the perceptual region selection method in sparse swarm intelligence sensing as described in any one of claims 1-3 or the data classification method as described in claim 4.
7. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the perceptual region selection method in sparse swarm intelligence sensing as described in any one of claims 1-3 or the data classification method as described in claim 4.
Citation Information
Patent Citations
Image data classification and method, apparatus and system of establishing classification model
CN107516102A
Participant optimization selection method oriented to sparse crowd sensing
CN114722904A