Intelligent government service training method and system based on deep learning
Through deep learning technology, the robustness of processing lighting changes, occlusion and angle changes of image data is improved, and the accuracy and efficiency of feature extraction in government services is solved, and the problems of low efficiency and poor robustness of traditional methods are solved.
Patent Information
- Application Number
- CN202410311758.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-03-19
AI Technical Summary
Traditional methods have poor robustness to light changes, occlusions and angle changes when processing image data, and have low processing efficiency, which cannot meet government service scenarios with high real-time requirements.
Using an intelligent government service training method based on deep learning, the distance between the data point and the center point is calculated by projecting image data to the two-dimensional plane, segmenting the training set and test set, analyzing the deviation, determining the correction factor, and training the convolutional neural network model , extract facial features and behavior patterns, and perform iterative optimization.
It improves the accuracy and robustness of feature extraction, can process complex and changeable government service image data more stably and reliably, and improves processing efficiency.
Smart Images

Figure CN118015430B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an intelligent government service training method and system based on deep learning. Background Art
[0002] With the rapid development of information technology and the advent of the intelligent era, government services are gradually shifting from traditional models to more efficient and intelligent models. As an important machine learning technology, deep learning has been widely used in image recognition, natural language processing, speech recognition and other fields. Its powerful feature extraction and abstraction capabilities make it show great potential in intelligent government services.
[0003] Traditional methods have poor robustness to factors such as illumination changes, occlusion, and angle changes in images. These factors will lead to a decrease in image quality, which in turn affects the accuracy of feature extraction and classification. Secondly, traditional methods are inefficient when processing large-scale image data and cannot meet the requirements of government service scenarios with high real-time requirements. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide an intelligent government service training method and system based on deep learning, which improves the accuracy and comprehensiveness of feature extraction.
[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0006] In the first aspect, a method for training intelligent government services based on deep learning is provided, the method comprising:
[0007] Project the processed image data onto a two-dimensional plane and calculate the center point of all data;
[0008] Calculate the distance from each data point to the center point, and sort the data points according to the distance to obtain sorted data points;
[0009] According to the sorted data points, the data points are divided into training set and test set;
[0010] Analyze the deviations between the training set and the test set to obtain analysis results;
[0011] According to the analysis results and the distance from each data point to the center point, a correction factor is determined for each data point in the training set to obtain the final training set and test set;
[0012] Training a convolutional neural network model according to the final training set and key user features to obtain a trained convolutional neural network model, wherein the key user features include facial features and behavior patterns;
[0013] Input the new monitoring image data into the trained convolutional neural network model, so that the trained convolutional neural network model abstracts and extracts features of the image data layer by layer to obtain the user in the image and extract the corresponding relevant features;
[0014] Use the test set to test and iteratively optimize the trained convolutional neural network model to obtain the final convolutional neural network model.
[0015] Furthermore, before projecting the processed image data onto a two-dimensional plane and calculating the center point of all data, the following steps are also included:
[0016] Data collection is performed through the monitoring equipment in the government service hall to obtain the original image data;
[0017] The original image data is preprocessed to obtain processed image data.
[0018] Furthermore, data collection is performed through the monitoring equipment in the government service hall to obtain original image data, including:
[0019] Determine the specific needs and scenarios of government services, determine the parameters of monitoring equipment and establish data collection processes based on the needs and scenarios;
[0020] Define data quality assessment indicators and randomly select samples from the initially collected data based on the data quality assessment indicators;
[0021] According to the data quality assessment indicators, the sample data is analyzed and processed, and the score is calculated for each indicator;
[0022] Combine the scores of each indicator to obtain the overall quality assessment result of the data source;
[0023] Based on the overall quality assessment results of the data source, adjust the monitoring equipment parameters and optimize the data collection process to obtain the original data.
[0024] Further, the convolutional neural network model is trained according to the final training set and key user features to obtain a trained convolutional neural network model, including:
[0025] Determine the convolutional neural network architecture based on the shape, size, and complexity of the input data and the specific needs of the government service;
[0026] Determine the initialization strategy and the shape of the weight matrix based on the configuration of each convolutional layer in the network architecture;
[0027] Generate a random value for each element in the weight matrix using a normal distribution;
[0028] Assign random values to the weight matrix;
[0029] Determine the shape of the bias, initialize the bias using a normal distribution, and assign the initialized bias value to the bias attribute of the model;
[0030] Determine the loss function based on the task type and the output format of the convolutional neural network model;
[0031] Compile the model according to the loss function, optimizer, and evaluation metric to obtain the trained convolutional neural network model.
[0032] Furthermore, the sample data is analyzed and processed according to the data quality assessment indicators, and scores are calculated for each indicator, including:
[0033] Determine data quality assessment indicators;
[0034] A portion of data is randomly selected from a data source as a sample, and the sample is processed to obtain a processed sample;
[0035] Analyzing the processed samples to obtain analysis results;
[0036] Based on the analysis results, a score is calculated for each data quality assessment indicator.
[0037] Furthermore, the scores of each indicator are combined to obtain the overall quality assessment results of the data source, including:
[0038] Determine the corresponding weight for each data quality assessment indicator based on business needs, data usage scenarios, and data characteristics;
[0039] The weighted score is calculated using the score of each indicator and the corresponding weight;
[0040] Based on the weighted scores, the overall quality assessment results of the data source are obtained.
[0041] Furthermore, according to the overall quality assessment results of the data source, the monitoring equipment parameters are adjusted and the data collection process is optimized to obtain the original data, including:
[0042] Determine the data collection strategy based on the overall quality assessment results of the data source;
[0043] According to the data collection strategy, the data collection system is configured so that the data collection system extracts raw data from the data source according to the configured parameters and rules.
[0044] In the second aspect, an intelligent government service training system based on deep learning includes:
[0045] The acquisition module is used to project the processed image data onto a two-dimensional plane and calculate the center point of all data; calculate the distance from each data point to the center point, and sort the data points according to the distance to obtain sorted data points; divide the data points into a training set and a test set according to the sorted data points; analyze the deviation of the training set and the test set to obtain the analysis result; determine a correction factor for each data point in the training set according to the analysis result and the distance from each data point to the center point to obtain the final training set and test set;
[0046] The processing module is used to train the convolutional neural network model according to the final training set and key user features to obtain a trained convolutional neural network model, where the key user features include facial features and behavior patterns; input new monitoring image data into the trained convolutional neural network model so that the trained convolutional neural network model abstracts and extracts features of the image data layer by layer to obtain the user in the image and extract the corresponding relevant features; use the test set to test the trained convolutional neural network model and iteratively optimize it to obtain the final convolutional neural network model.
[0047] According to a third aspect, a computing device includes:
[0048] one or more processors;
[0049] The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.
[0050] In a fourth aspect, a computer-readable storage medium stores a program, and the program implements the above method when executed by a processor.
[0051] The above solution of the present invention includes at least the following beneficial effects:
[0052] Through deep learning algorithms, high-level feature representations in images can be automatically learned, avoiding the complexity and limitations of manually designed features in traditional methods. Deep learning models can automatically extract key information in images, such as facial features and behavioral patterns, thereby improving the accuracy and comprehensiveness of feature extraction.
[0053] The deep learning model is highly robust to factors such as lighting changes, occlusion, and angle changes in images. Through training with large-scale data, the model can learn more generalized feature representations and adapt to image changes in different scenarios. This makes the model more stable and reliable when processing complex and changeable government service image data.
[0054] The deep learning model uses parallel computing to make full use of computing resources and improve the processing efficiency of image data. Compared with traditional methods, deep learning can process larger-scale image data in a shorter time. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a flow chart of the intelligent government service training method based on deep learning provided in an embodiment of the present invention.
[0056] Figure 2 It is a schematic diagram of an intelligent government service training system based on deep learning provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0058] like Figure 1 As shown, an embodiment of the present invention proposes an intelligent government service training method based on deep learning, and the method includes:
[0059] Step 11, projecting the processed image data onto a two-dimensional plane and calculating the center point of all data;
[0060] Step 12, calculating the distance from each data point to the center point, and sorting the data points according to the distance to obtain sorted data points;
[0061] Step 13, according to the sorted data points, divide the data points into a training set and a test set;
[0062] Step 14, analyzing the deviation between the training set and the test set to obtain an analysis result;
[0063] Step 15, according to the analysis results and the distance from each data point to the center point, a correction factor is determined for each data point in the training set to obtain the final training set and test set;
[0064] Step 16, training the convolutional neural network model according to the final training set and key user features to obtain a trained convolutional neural network model, where the key user features include facial features and behavior patterns;
[0065] Step 17, inputting the new monitoring image data into the trained convolutional neural network model, so that the trained convolutional neural network model performs layer-by-layer abstraction and feature extraction on the image data to obtain the user in the image and extract the corresponding relevant features;
[0066] Step 18: Use the test set to test and iteratively optimize the trained convolutional neural network model to obtain the final convolutional neural network model.
[0067] In an embodiment of the present invention, step 11, by projecting the image data onto a two-dimensional plane and calculating the center point, the distribution of the data can be intuitively understood. This dimensionality reduction process helps to reduce computational complexity and improve processing efficiency. Step 12, by calculating the distance from the data point to the center point and sorting it, the similarity or difference between each data point and the center point can be quantified, making the selection of the training set and the test set more reasonable and effective. Step 13, by dividing the training set and the test set according to the sorted data points, it can be ensured that the training set contains representative samples, and the test set is used to evaluate the performance of the model. This division method helps to improve the generalization ability and prediction accuracy of the model. Step 14, by analyzing the deviations of the training set and the test set, the performance differences of the model on different data sets can be understood, which helps to discover possible overfitting or underfitting problems of the model. Step 15, by assigning a correction factor to each data point in the training set, the learning process of the model can be adjusted according to the importance and representativeness of the data point. This weighted processing helps the model to better focus on key information and improve training effects and prediction accuracy. Step 16: Using key user features (such as facial features and behavior patterns) to train the convolutional neural network model can make the model more focused on extracting user-related feature information, which helps improve the model's ability to identify and understand user behavior. Step 17: By inputting new surveillance image data into the trained model, automatic processing and feature extraction of image data can be achieved. This layer-by-layer abstraction method helps the model learn more advanced and abstract feature representations from the original image, and improves the accuracy of identifying user behavior. Step 18: By using the test set to test and iteratively optimize the model, the performance and stability of the model can be continuously improved. This iterative optimization process helps to discover and correct possible errors and deficiencies in the model, and improve the reliability and generalization ability of the model in practical applications.
[0068] In a preferred embodiment of the present invention, before projecting the processed image data onto a two-dimensional plane and calculating the center point of all data, the method further includes:
[0069] Data collection is performed through the monitoring equipment in the government service hall to obtain the original image data;
[0070] The original image data is preprocessed to obtain processed image data.
[0071] In an embodiment of the present invention, data is collected through the monitoring equipment of the government service hall to obtain original image data. The original image data is directly obtained from the monitoring equipment of the government service hall, which ensures the authenticity and real-time nature of the data. This data collection method can capture the actual situation of the government service site. The original image data is preprocessed to obtain processed image data. Preprocessing is a key step in image analysis. It can eliminate noise, distortion and other interference factors in the original image and improve the quality of the image. By preprocessing the original image data, such as denoising, enhancement, normalization and other operations, subsequent feature extraction and model training can be made more accurate and efficient. Preprocessing also helps to reduce computational complexity and improve the speed and performance of the entire processing flow.
[0072] In another preferred embodiment of the present invention, the above step 11 may include:
[0073] Step 111, assume that there are n data points, each of which is composed of values of multiple dimensions;
[0074] Step 112, calculating the average values of all data points in each dimension to obtain the coordinates of the center point.
[0075] In the embodiment of the present invention, in step 111, the processing object is a multi-dimensional data point. Through multi-dimensional analysis, the characteristics and distribution of the data can be more comprehensively understood. In step 112, the coordinates of the center point are obtained by calculating the average value of all data points in each dimension. This method is simple and effective and can accurately reflect the central trend of the data set.
[0076] In another preferred embodiment of the present invention, the above step 12 may include:
[0077] Step 121, based on the coordinates of the center point, calculate the difference between the data point in each dimension and the dimension corresponding to the center point; square the difference; sum up the squared differences in all dimensions to obtain a sum, take the square root of the sum, and obtain the distance from the data point to the center point;
[0078] Step 122, sorting the data points according to the distance from each data point to the center point, specifically comprising: creating a list containing the indexes of the data points, and sorting them according to the corresponding distances, the sorting is in ascending order (from small to large distances), and the sorted list will first contain the indexes of the data points closest to the center point, and finally contain the indexes of the data points farthest from the center point;
[0079] Step 123, output the sorted data points according to the sorted index list; traverse the sorted index list, and use these indexes to extract corresponding data points from the original data point set, and obtain a list of data points sorted by distance to the center point.
[0080] In an embodiment of the present invention, the distance measurement method used can accurately reflect the true distance between two points in a multidimensional space; sorting the data points according to the calculated distance helps to quickly identify and locate outliers, outliers, or data points closest to the center point in the data set. Outputting the sorted data points according to the sorted index list makes the results clearer and easier to understand. The user can directly observe the sorting of the data points, thereby more intuitively understanding the distribution characteristics of the data. This data processing method is not only suitable for simple data analysis tasks, but also can be applied to more complex scenarios. In these scenarios, by calculating the distance from the data point to the center point and sorting it, it can help the algorithm better understand and process the data. By calculating the center point first and then using the center point to calculate the distance of each data point, unnecessary repeated calculations are avoided and the efficiency of data processing is improved.
[0081] In another preferred embodiment of the present invention, the above step 13 may include:
[0082] Step 131, starting from the beginning of the list (ie, the data point closest to the center point), select a certain number of data points in turn as a training set, and then select data points from the rest of the list as a test set.
[0083] In an embodiment of the present invention, by using more typical and more common data points as training data, the model may be more likely to learn the general laws of the data rather than the noise or abnormal characteristics of specific data points, thereby reducing the risk of overfitting. The present invention does not require complex stratified sampling or random sampling processes, thereby simplifying the data preprocessing steps, reducing computational complexity and possible errors. Since the test set is selected from the remaining part of the sorted data point list, it may contain more data points far from the center point.
[0084] In another preferred embodiment of the present invention, the above step 14 may include:
[0085] Step 141, defining evaluation indicators according to specific tasks, where the evaluation indicators are used to quantify the performance difference of the model on the training set and the test set;
[0086] Step 141, use the training set data to train the machine learning model to ensure that the model achieves good performance on the training set while avoiding overfitting. Apply the trained model to the test set and calculate the evaluation indicators. Compare the evaluation indicators of the model on the training set and the test set and calculate the difference between them. If the performance of the model on the test set is significantly lower than that on the training set, it may be due to overfitting. Overfitting means that the model is too complex to the point that it "remembers" the noise and specific details in the training set instead of learning the general rules of the data. Using visualization tools such as charts and confusion matrices to display the evaluation results on the training set and test set will help to more intuitively understand the source of the deviation and the changing trend of the model performance, and formulate corresponding adjustment strategies based on the results of the deviation analysis.
[0087] In another preferred embodiment of the present invention, the above step 15 may include:
[0088] Step 151, according to the result of deviation analysis, determine the key factors affecting the model performance, the key factors include the distance of the data points, the category they belong to, and the size of the eigenvalue;
[0089] Step 152, assigning a correction factor to each data point based on the key factors;
[0090] Step 153, for each data point in the training set, calculate the distance from the data point to the center point;
[0091] Step 154, calculating a correction factor for each data point based on the calculated distance and the category label of the data point;
[0092] Step 155 , applying the calculated correction factor to each data point in the training set, for example, multiplying the correction factor by the eigenvalue of the data point.
[0093] In an embodiment of the present invention, step 151 determines the key factors that affect the performance of the model, including the distance of the data points, the category they belong to, and the size of the eigenvalues, so that the subsequent optimization work can be carried out more targeted and directly adjust the factors that have a significant impact on the performance of the model. Step 152 assigns a correction factor to each data point based on the key factors, which means that each data point will be adjusted individually according to its own characteristics. This adjustment method helps to more finely control the response of the model to different data points, thereby improving the adaptability and accuracy of the model. Step 153 calculates the distance from each data point to the center point. This information is fully utilized in the subsequent calculation of the correction factor. The distance information reflects the distribution of the data point in the feature space. Step 154 takes into account multiple factors such as the distance and category label of the data point when calculating the correction factor. This comprehensive consideration helps to more comprehensively evaluate the impact of the data point on the model performance, thereby obtaining a more accurate correction factor. Step 155 applies the calculated correction factor to each data point in the training set, for example, by multiplying it with the eigenvalue of the data point. This application method is simple and flexible, and can be adjusted according to specific needs and scenarios. At the same time, it also helps to directly reflect the effect of the correction factor in the model training process, thereby more directly improving the performance of the model.
[0094] In another preferred embodiment of the present invention, the above step 153 may include:
[0095] Step 1531, for each data point x i ,pass Calculate the distance d from the center point i The normalized value of So that all normalized values will be between 0 and 1;
[0096] Step 1532, for each category c∈C, calculate its frequency of occurrence (p_c) in the training set. Then, for each data point x i , according to its category label y i , calculate the category weight w i ,in,
[0097]
[0098] If a category rarely appears in the training set, then the data points of that category will receive a higher weight;
[0099] Step 1533, based on the normalized value and class weight w i ,pass Calculate for each data point x i The correction factor fi ; where α and β are hyperparameters used to control the importance of distance and category weight in the correction factor.
[0100] In an embodiment of the present invention, in step 1531, the distance from each data point to the center point is normalized, and the original distance value is converted to between 0 and 1. This normalization process helps to eliminate the influence of different feature scales on the distance calculation, making the comparison between different features more fair and accurate. At the same time, the normalized distance value is easier to understand and explain, which is convenient for subsequent analysis and application. In step 1532, the frequency of occurrence of each category in the training set is calculated, and a category weight is assigned to each data point according to the category label. This weight allocation method enables less frequent categories to obtain higher weights in the correction factor calculation, thereby helping the model to better learn and identify these categories. This is very useful for processing unbalanced data sets and can improve the model's recognition performance for a few categories. In step 1533, the normalized distance value and category weight are combined to calculate the correction factor. This comprehensive correction factor takes into account both the location information of the data point in the feature space (reflected by the distance) and the distribution of the category (reflected by the weight). This enables the correction factor to more comprehensively reflect the characteristics of the data point and provide more accurate and targeted adjustment information for the model. By introducing hyperparameters α and β, the importance of distance and category weight in the correction factor can be controlled. This flexibility allows the calculation of the correction factor to be adjusted and optimized according to the characteristics of specific tasks and datasets to achieve the best performance improvement.
[0101] In a preferred embodiment of the present invention, data collection is performed through monitoring equipment in a government service hall to obtain original image data, which may include:
[0102] Determine the specific needs and scenarios for government services;
[0103] Define data quality assessment indicators, and randomly extract a portion of data from the data source as samples based on the data quality assessment indicators;
[0104] According to the data quality assessment indicators, the sample data is analyzed and processed, and the score is calculated for each indicator;
[0105] Combine the scores of each indicator to obtain the overall quality assessment result of the data source;
[0106] Based on the overall quality assessment results of the data source, adjust the monitoring equipment parameters and optimize the data collection process to obtain the original data.
[0107] In an embodiment of the present invention, by defining data quality evaluation indicators and analyzing and processing sample data, it is possible to ensure that the original image data obtained from the monitoring device is more accurate. According to the overall quality evaluation results of the data source, the parameters of the monitoring device can be adjusted and the data collection process can be optimized. This will make data collection more efficient, reduce unnecessary waste of resources, and improve the efficiency and speed of data collection. High-quality data can provide more reliable information support for decision makers in the government service hall, helping them to make decisions faster. The original image data collected by the monitoring device can be used for the supervision and evaluation of government services, increase the transparency of the services, and the public can understand the operation of the government service hall more intuitively, thereby improving the public's trust and satisfaction with government services. By performing quality evaluation on the collected data, problems in the data collection process, such as equipment failure, data loss, etc., can be discovered in a timely manner. This will help to solve problems in a timely manner, avoid the expansion of problems, and ensure the continuity and stability of government services.
[0108] In a preferred embodiment of the present invention, the sample data is analyzed and processed according to the data quality assessment index, and a score is calculated for each index, which may include:
[0109] Determine data quality assessment indicators;
[0110] A portion of data is randomly selected from a data source as a sample, and the sample is processed to obtain a processed sample;
[0111] Analyzing the processed samples to obtain analysis results;
[0112] Based on the analysis results, a score is calculated for each data quality assessment indicator.
[0113] In an embodiment of the present invention, by determining data quality assessment indicators, a clear and measurable standard is provided for data quality, avoiding subjective assumptions and misunderstandings. Randomly extracting sample data from the data source for analysis, rather than processing the entire data set, can significantly reduce the complexity and time required for data processing, and can draw representative conclusions within a reasonable time. By analyzing the processed sample data, problems such as outliers, missing values, and duplicate values in the data can be identified, so that corresponding measures can be taken to correct them. By calculating a score for each data quality assessment indicator, the data quality can be converted into a comparable numerical form, so that the data quality of different data sources or different time periods can be compared horizontally and vertically, which helps to more intuitively understand the changes and trends in data quality. Calculating a score for each indicator based on the analysis results can provide decision makers with a clear overview of the data quality.
[0114] In another preferred embodiment of the present invention, analyzing the processed sample to obtain the analysis result may include:
[0115] Perform statistical analysis on the processed samples to obtain the skewness Sk and kurtosis k u , skewness and kurtosis are used to evaluate the distribution characteristics of the data, where
[0116]
[0117] Where n represents the number of samples, x i represents the i-th sample observation value, x j represents the jth sample observation, where i and j are indexes from 1 to n, and w i and w j The weight associated with each sample observation, k represents an adjustment factor used to scale the value of skewness; where
[0118]
[0119] Where k is the scaling factor used to adjust the scale of the kurtosis, and w i is the weight associated with the ith sample observation, is the weighted sample mean;
[0120] Calculate the proportion of missing values to understand the degree of data integrity; check the duplicate records in the data and perform deduplication processing to verify the logical relationship between data fields to ensure data consistency; calculate the accuracy of the data by comparing it with known real data;
[0121] pass Calculate the correlation coefficient r between the features, where k2 is a scaling factor used to adjust the scale of the correlation coefficient and can be an arbitrary real number; L i is the weight of the ith data point, L j is the weight of the jth data point; x i and i are the x and y values of the ith data point respectively; n is the sample size, that is, the number of data points.
[0122] In an embodiment of the present invention, the processed samples are statistically analyzed, the main purpose of which is to obtain skewness and kurtosis, which are important statistics for describing the characteristics of data distribution. Skewness reflects the asymmetry of data distribution, while kurtosis reflects the sharpness or flatness of data distribution. The calculation formula of skewness takes into account the difference between each sample observation and its weighted mean, and emphasizes this difference by cubic. In addition, weights and adjustment factors are introduced, so that the formula can more flexibly cope with different data sets and analysis requirements; the calculation formula of kurtosis is similar to skewness, but the fourth power is used to further emphasize the extreme values in the data distribution. Similarly, the formula also considers the influence of weights and adjustment factors. Calculate the correlation coefficient between features, which is a statistic that measures the strength and direction of the linear relationship between two variables. In this step, a weighted method is used to calculate the correlation coefficient, that is, the weight of each data point is taken into account. In addition, a scaling factor is introduced to adjust the scale of the correlation coefficient. By introducing weights and adjustment factors, this step can more flexibly cope with different data sets and analysis requirements.
[0123] Weights can be assigned based on the reliability or importance of the data, while adjustment factors can be used to control the scale of skewness and kurtosis; skewness and kurtosis are important tools for evaluating the distribution characteristics of data. By calculating these two statistics, the symmetry, sharpness, or flatness of the data can be quantitatively assessed. By considering the weight of each data point, this step can more accurately reflect the actual relationship in the data. In some cases, some data points may be more important or reliable than others and should be given higher weights. This weighting process helps to improve the accuracy and reliability of the correlation coefficient. The introduction of scaling factors allows the scale of the correlation coefficient to be adjusted according to specific needs. This is very useful for comparing correlations between different data sets or for standardization. By adjusting the value of the scaling factor, the correlation coefficient can be converted to a specific range, making it easier to interpret and compare.
[0124] In a preferred embodiment of the present invention, the scores of various indicators are combined to obtain the overall quality assessment result of the data source, which may include:
[0125] Determine the corresponding weight for each data quality assessment indicator based on business needs, data usage scenarios, and data characteristics;
[0126] The weighted score is calculated using the score of each indicator and the corresponding weight;
[0127] Based on the weighted scores, the overall quality assessment results of the data source are obtained.
[0128] In an embodiment of the present invention, by considering business needs, data usage scenarios and data characteristics, reasonable weights can be assigned to different data quality indicators, thereby more accurately reflecting the importance of data in practical applications, and improving the efficiency and effectiveness of data quality management. By calculating weighted scores, this step can quantify the importance of different indicators and integrate them into a unified evaluation framework, which not only considers the independent contribution of each indicator, but also adjusts their relative importance in the overall evaluation through weights. This helps to evaluate data quality more comprehensively and avoid the deviations that may be caused by single indicator evaluation. A comprehensive and quantitative data source quality evaluation result is provided, which is convenient for decision makers and managers to quickly understand the overall quality status of the data source. By comparing the weighted scores of different data sources, they can be sorted and prioritized.
[0129] In a preferred embodiment of the present invention, the weighted score is calculated using the score of each indicator and the corresponding weight, which may include:
[0130] Determine each data quality assessment metric;
[0131] Multiply the score of each indicator by the corresponding weight, sensitivity factor, and reliability factor to obtain the weighted score contribution;
[0132] The weighted score contributions of all indicators are added together to obtain the total weighted score T of the data source, where the calculation formula for the total weighted score T of the data source is:
[0133]
[0134] Among them, S i represents the score of the ith indicator, reflecting the performance of the data quality measured by the indicator; W i represents the weight of the i-th indicator, which is determined according to business needs, data usage scenarios and data characteristics. α represents the sensitivity adjustment parameter, which is used to control the responsiveness of the sensitivity factor to data changes. A larger α value will make the sensitivity factor more sensitive to data changes. Δ i It represents the change in the data integrity index, which can be the proportion of missing data; β represents the reliability weight parameter, which is used to balance the importance of the historical average score and the most recent score in the calculation of the reliability factor. A larger β value will give a greater weight to the historical average score. The value range of β is [0, 1]; Hi i La represents the historical average score of the ith indicator, reflecting the historical performance of the data source on this indicator; i It represents the score of the data source on the i-th indicator in the most recent evaluation, reflecting the latest performance of the data source on this indicator; n represents the total number of indicators, that is, the number of data quality indicators involved in the evaluation.
[0135] In the embodiment of the present invention, by comprehensively considering multiple data quality evaluation indicators, the comprehensiveness of the evaluation is ensured. Different indicators can reflect data quality from different angles, avoiding the deviation that may be caused by single indicator evaluation. By assigning weights, sensitivity factors and reliability factors to each indicator, the embodiment provides a flexible evaluation mechanism. These factors can be adjusted according to changes in business needs, data usage scenarios and data characteristics, so that the evaluation results are more in line with the actual situation. The introduction of sensitivity factors enables the evaluation method to better capture changes in data quality. By adjusting the sensitivity adjustment parameter α, the degree of response of the sensitivity factor to data changes can be controlled, making the evaluation results more sensitive or robust. The calculation of the reliability factor takes into account the historical average score and the most recent score, achieving a balance between historical performance and the latest performance. This balance helps to avoid the contingency of the evaluation results and makes the evaluation results more stable and reliable. By calculating the total weighted score T, it is convenient for decision makers and managers to quickly understand the overall quality status of the data source. The evaluation method can also be used as a basis for improving and optimizing the data source. By comparing the total weighted score T at different time points, the changing trend of the data source quality can be monitored.
[0136] In a preferred embodiment of the present invention, adjusting monitoring equipment parameters and optimizing data collection processes according to the overall quality evaluation results of the data source to obtain raw data may include:
[0137] Determine the data collection strategy based on the overall quality assessment results of the data source;
[0138] According to the data collection strategy, the data collection system is configured so that the data collection system extracts raw data from the data source according to the configured parameters and rules.
[0139] In an embodiment of the present invention, by performing an overall quality assessment on the data source, high-quality and low-quality data sources can be identified. For high-quality data sources, more efficient data collection strategies can be adopted, such as increasing the collection frequency or reducing the data verification steps, thereby improving the efficiency of data collection. The evaluation results can reveal the problems and risks in the data source. Based on this information, targeted data collection strategies can be determined, such as adding data cleaning steps or introducing additional data verification mechanisms to reduce the possibility of introducing errors during the data collection process. Understanding the quality status of the data source helps to allocate data collection resources more reasonably. For data sources with lower quality, more resources can be allocated for data preprocessing and quality control, while for data sources with higher quality, resources can be saved for other key tasks.
[0140] By configuring the data acquisition system, the data acquisition process can be automated, manual operations and human intervention can be reduced, thereby improving the efficiency and accuracy of data acquisition; by uniformly configuring the parameters and rules of the data acquisition system, it can be ensured that the original data extracted from different data sources follow the same format and standards, thereby facilitating subsequent data integration and analysis; by reasonably configuring the data acquisition system, the resource utilization in the data acquisition process can be optimized, unnecessary resource waste can be reduced, thereby reducing the overall cost of data acquisition; when the data source changes, only the configuration of the data acquisition system needs to be adjusted accordingly, without the need to reconstruct the entire data acquisition process, thereby improving the flexibility and adaptability of data acquisition.
[0141] In a preferred embodiment of the present invention, training a convolutional neural network model according to the final training set and key user features to obtain a trained convolutional neural network model may include:
[0142] Determine the convolutional neural network architecture based on the shape, size, and complexity of the input data and the specific needs of the government service;
[0143] Determine the initialization strategy and the shape of the weight matrix based on the configuration of each convolutional layer in the network architecture;
[0144] Generate a random value for each element in the weight matrix using a normal distribution;
[0145] Assign random values to the weight matrix;
[0146] Determine the shape of the bias, initialize the bias using a normal distribution, and assign the initialized bias value to the bias attribute of the model;
[0147] According to the task type and the output format of the convolutional neural network model, the loss function is determined. The calculation formula of the loss function is:
[0148]
[0149] Where L is the loss value, N is the number of samples in the batch, C is the total number of categories, and y ij is the true label of the i-th sample corresponding to category j; p ij is the probability that the i-th sample predicted by the convolutional neural network model belongs to category j; λ is the coefficient of the regularization term, which is used to control the strength of regularization, θ k represents the kth parameter in the convolutional neural network model, is a constant factor used to simplify gradient calculation;
[0150] Compile the model according to the loss function, optimizer, and evaluation metric to obtain the trained convolutional neural network model.
[0151] In an embodiment of the present invention, the network architecture is determined according to the shape, size and complexity of the input data and the specific needs of the government service, which can ensure that the network structure matches the task requirements, thereby improving the performance and accuracy of the model and helping to more efficiently process specific types of data and problems. Using a suitable initialization strategy (such as normal distribution) to assign weights and biases can help the model converge more quickly at the beginning of training. Good initialization can avoid problems such as gradient disappearance or explosion, thereby accelerating the training process and improving the stability of the model. The loss function is a key indicator to measure the gap between the model prediction and the actual label. The loss function used in the present invention combines the classification cross entropy and the regularization term, which takes into account both the classification accuracy and the complexity of the model, helps to prevent overfitting and improves the generalization ability of the model on unseen data. By maximizing the log-likelihood of the predicted probability and the true label, the model is encouraged to predict the probability of each category more accurately. By penalizing the sum of squares of the model parameters, the model is encouraged to remain simple and avoid overly complex fitting, thereby improving generalization ability. Compiling the model according to the determined loss function, optimizer and evaluation index can ensure that the training process is consistent with the expected goal.
[0152] In another preferred embodiment of the present invention, the above step 17 may include:
[0153] In step 171, the new image data obtained from the monitoring equipment of the government service hall is input into the trained convolutional neural network model. These new monitoring image data contain information such as different behaviors, postures and expressions of users.
[0154] The convolutional neural network model will perform layer-by-layer abstraction and feature extraction on these image data according to the learned hierarchical structure and feature extraction method. Specifically, the convolution layer in the model will be responsible for extracting local features in the image, such as edges, textures, etc.; the pooling layer will reduce the dimension and abstract these features to extract higher-level features; the fully connected layer will perform tasks such as classification or regression based on the extracted features.
[0155] Through this process, the model is able to identify the user in the image and extract user-related features, such as the user's facial features, body posture, behavioral patterns, etc.
[0156] In another preferred embodiment of the present invention, the above step 18 may include:
[0157] Step 181, use the test set to evaluate the performance of the trained convolutional neural network model. The data in the test set is new data that has never participated in model training, so it can be used to objectively evaluate the generalization ability of the model.
[0158] The image data in the test set is input into the model, and the difference between the model's prediction results and the true labels is compared. By calculating indicators such as accuracy, recall, and F1 score, the performance of the model can be quantitatively evaluated. If the performance of the model meets the expected requirements, it can be deployed in actual application scenarios; if the performance of the model is not good, it needs to be iteratively optimized according to the test results. Optimization methods may include adjusting the network structure of the model, increasing training data, using more complex training strategies, etc. Through continuous testing and optimization, a convolutional neural network model with stable performance, high accuracy, and strong generalization ability can be obtained.
[0159] like Figure 2 As shown, an embodiment of the present invention further provides an intelligent government service training system 20 based on deep learning, comprising:
[0160] The acquisition module 21 is used to project the processed image data onto a two-dimensional plane and calculate the center point of all the data; calculate the distance from each data point to the center point, and sort the data points according to the distance to obtain sorted data points; divide the data points into a training set and a test set according to the sorted data points; analyze the deviation of the training set and the test set to obtain an analysis result; determine a correction factor for each data point in the training set according to the analysis result and the distance from each data point to the center point to obtain a final training set and test set;
[0161] The processing module 22 is used to train the convolutional neural network model according to the final training set and key user features to obtain a trained convolutional neural network model, where the key user features include facial features and behavior patterns; input new monitoring image data into the trained convolutional neural network model so that the trained convolutional neural network model abstracts and extracts features of the image data layer by layer to obtain the user in the image and extract the corresponding relevant features; use the test set to test and iteratively optimize the trained convolutional neural network model to obtain the final convolutional neural network model.
[0162] Optionally, before projecting the processed image data onto a two-dimensional plane and calculating the center point of all data, the following steps may also be performed:
[0163] Data collection is performed through the monitoring equipment in the government service hall to obtain the original image data;
[0164] The original image data is preprocessed to obtain processed image data.
[0165] Optionally, data collection is performed through the monitoring equipment in the government service hall to obtain original image data, including:
[0166] Determine the specific needs and scenarios of government services, determine the parameters of monitoring equipment and establish data collection processes based on the needs and scenarios;
[0167] Define data quality assessment indicators and randomly select samples from the initially collected data based on the data quality assessment indicators;
[0168] According to the data quality assessment indicators, the sample data is analyzed and processed, and the score is calculated for each indicator;
[0169] Combine the scores of each indicator to obtain the overall quality assessment result of the data source;
[0170] Based on the overall quality assessment results of the data source, adjust the monitoring equipment parameters and optimize the data collection process to obtain the original data.
[0171] Optionally, a convolutional neural network model is trained according to the final training set and key user features to obtain a trained convolutional neural network model, including:
[0172] Determine the convolutional neural network architecture based on the shape, size, and complexity of the input data and the specific needs of the government service;
[0173] Determine the initialization strategy and the shape of the weight matrix based on the configuration of each convolutional layer in the network architecture;
[0174] Generate a random value for each element in the weight matrix using a normal distribution;
[0175] Assign random values to the weight matrix;
[0176] Determine the shape of the bias, initialize the bias using a normal distribution, and assign the initialized bias value to the bias attribute of the model;
[0177] Determine the loss function based on the task type and the output format of the convolutional neural network model;
[0178] Compile the model according to the loss function, optimizer, and evaluation metric to obtain the trained convolutional neural network model.
[0179] Optionally, analyze and process the sample data according to the data quality assessment indicators and calculate scores for each indicator, including:
[0180] Determine data quality assessment indicators;
[0181] A portion of data is randomly selected from a data source as a sample, and the sample is processed to obtain a processed sample;
[0182] Analyzing the processed samples to obtain analysis results;
[0183] Based on the analysis results, a score is calculated for each data quality assessment indicator.
[0184] Optionally, the scores of each indicator are combined to obtain an overall quality assessment result of the data source, including:
[0185] Determine the corresponding weight for each data quality assessment indicator based on business needs, data usage scenarios, and data characteristics;
[0186] The weighted score is calculated using the score of each indicator and the corresponding weight;
[0187] Based on the weighted scores, the overall quality assessment results of the data source are obtained.
[0188] Optionally, based on the overall quality assessment results of the data source, adjust monitoring equipment parameters and optimize the data collection process to obtain raw data, including:
[0189] Determine the data collection strategy based on the overall quality assessment results of the data source;
[0190] According to the data collection strategy, the data collection system is configured so that the data collection system extracts raw data from the data source according to the configured parameters and rules.
[0191] It should be noted that the system is a system corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0192] The embodiment of the present invention further provides a computing device, comprising: a processor, a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0193] The embodiment of the present invention also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0194] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in 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 invention.
[0195] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0196] In the embodiments provided by the present invention, 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 the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, 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.
[0197] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0198] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0199] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0200] In addition, it should be noted that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understood that all or any steps or components of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or a network of computing devices in hardware, firmware, software or a combination thereof, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.
[0201] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.
[0202] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An intelligent government service training method based on deep learning, characterized in that: The method comprises: Project the processed image data onto a two-dimensional plane and calculate the center point of all data; Calculate the distance from each data point to the center point, and sort the data points according to the distance to obtain sorted data points; According to the sorted data points, the data points are divided into training set and test set; Analyze the deviations between the training set and the test set to obtain analysis results; According to the analysis results and the distance from each data point to the center point, a correction factor is determined for each data point in the training set to obtain the final training set and test set; Training a convolutional neural network model according to the final training set and key user features to obtain a trained convolutional neural network model, wherein the key user features include facial features and behavior patterns; Input the new monitoring image data into the trained convolutional neural network model, so that the trained convolutional neural network model abstracts and extracts features of the image data layer by layer to obtain the user in the image and extract the corresponding relevant features; Use the test set to test and iteratively optimize the trained convolutional neural network model to obtain the final convolutional neural network model; Projecting the processed image data onto a two-dimensional plane and calculating the center point of all data also includes: Data collection is performed through the monitoring equipment in the government service hall to obtain original image data; Preprocessing the original image data to obtain processed image data; Data collection is performed through the monitoring equipment in the government service hall to obtain original image data, including: Determine the specific needs and scenarios of government services, determine the parameters of monitoring equipment and establish data collection processes based on the needs and scenarios; Define data quality assessment indicators and randomly select samples from the initially collected data based on the data quality assessment indicators; According to the data quality assessment indicators, the sample data is analyzed and processed, and the score is calculated for each indicator; Combine the scores of each indicator to obtain the overall quality assessment result of the data source; According to the overall quality assessment results of the data source, adjust the monitoring equipment parameters and optimize the data collection process to obtain the original data; The convolutional neural network model is trained according to the final training set and key user features to obtain a trained convolutional neural network model, including: Determine the convolutional neural network architecture based on the shape, size, and complexity of the input data and the specific needs of the government service; Determine the initialization strategy and the shape of the weight matrix based on the configuration of each convolutional layer in the network architecture; Generate a random value for each element in the weight matrix using a normal distribution; Assign random values to the weight matrix; Determine the shape of the bias, initialize the bias using a normal distribution, and assign the initialized bias value to the bias attribute of the model; Determine the loss function based on the task type and the output format of the convolutional neural network model; Compile the model according to the loss function, optimizer and evaluation index to obtain the trained convolutional neural network model; According to the data quality assessment indicators, the sample data is analyzed and processed, and scores are calculated for each indicator, including: Determine data quality assessment indicators; A portion of data is randomly selected from a data source as a sample, and the sample is processed to obtain a processed sample; Analyzing the processed samples to obtain analysis results; Based on the analysis results, a score is calculated for each data quality assessment indicator; The scores of each indicator are combined to obtain the overall quality assessment result of the data source, including: Determine the corresponding weight for each data quality assessment indicator based on business needs, data usage scenarios, and data characteristics; The weighted score is calculated using the score of each indicator and the corresponding weight; According to the weighted score, the overall quality assessment result of the data source is obtained; According to the overall quality assessment results of the data source, adjust the monitoring equipment parameters and optimize the data collection process to obtain the original data, including: Determine the data collection strategy based on the overall quality assessment results of the data source; According to the data collection strategy, configure the data collection system so that the data collection system extracts raw data from the data source according to the configured parameters and rules; Calculate the distance from each data point to the center point, and sort the data points according to the distance to obtain sorted data points, including: According to the coordinates of the center point, calculate the difference between the data point and the dimension corresponding to the center point in each dimension; add up the square differences in all dimensions to get the sum, take the square root of the sum, and get the distance from the data point to the center point; Sort the data points according to the distance from each data point to the center point, specifically including: creating a list containing the indexes of the data points and sorting them in ascending order according to the corresponding distances. The sorted list will first contain the indexes of the data points closest to the center point and finally contain the indexes of the data points farthest away; According to the sorted index list, the sorted data points are output; the sorted index list is traversed, and the corresponding data points are extracted from the original data point set using these indexes, and a list of data points sorted by distance to the center point is obtained.
2. Intelligent government service training system based on deep learning, characterized by: For executing the method according to claim 1, comprising: The acquisition module is used to project the processed image data onto a two-dimensional plane and calculate the center point of all data; calculate the distance from each data point to the center point, and sort the data points according to the distance to obtain sorted data points; divide the data points into a training set and a test set according to the sorted data points; analyze the deviation of the training set and the test set to obtain the analysis result; determine a correction factor for each data point in the training set according to the analysis result and the distance from each data point to the center point to obtain the final training set and test set; The processing module is used to train the convolutional neural network model according to the final training set and key user features to obtain a trained convolutional neural network model, where the key user features include facial features and behavior patterns; input new monitoring image data into the trained convolutional neural network model so that the trained convolutional neural network model abstracts and extracts features of the image data layer by layer to obtain the user in the image and extract the corresponding relevant features; use the test set to test the trained convolutional neural network model and iteratively optimize it to obtain the final convolutional neural network model.
3. A computing device, characterized in that: include: one or more processors; A storage device, used for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method as claimed in claim 1.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, which implements the method according to claim 1 when executed by a processor.
