Event governance investment operation method and device and medium
Through the event governance investment management method, the marginal returns are calculated using the random forest algorithm and the resource allocation is optimized, which solves the problem of unreasonable resource allocation in the existing technology, and improves event processing efficiency and public satisfaction.
Patent Information
- Application Number
- CN202411132047.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-26
AI Technical Summary
The existing resource allocation strategies lack scientific basis and are difficult to quantify investment returns, resulting in the failure to resolve the incident in a timely and effective manner, affecting the quality of life of residents.
The event governance input operation method is adopted, by obtaining event description data and gradient parameters to be set, using a pre-trained random forest algorithm model, the marginal return is calculated to obtain the optimal event input parameters, and optimize resource configuration.
It improves the efficiency of incident handling and public satisfaction, provides a more scientific and accurate resource allocation strategy, and ensures that the problems are resolved quickly and properly.
Smart Images

Figure CN119026803A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure at least relates to the field of data processing technology, and in particular to an event management investment and operations method, an event management investment and operations device, and a computer-readable storage medium. Background Art
[0002] With the booming digital economy and the deepening of digital transformation, the demand for emergency handling within the region is also growing. These demands, combined with factors such as limited local resources and extended event handling cycles, have resulted in some events not being resolved in a timely and effective manner, which in turn has a significant negative impact on the quality of life of local residents.
[0003] In order to safeguard the legitimate rights of residents and improve their quality of life, relevant departments urgently need to adopt scientific methods to optimize resource allocation and formulate efficient strategies to ensure that problems are resolved quickly and properly.
[0004] However, the current resource allocation strategies have flaws, such as the lack of scientific basis for the allocation mechanism and the difficulty in quantifying the return on investment, which hinder the effective resolution of the problem. Summary of the invention
[0005] The technical problem to be solved by the present disclosure is to provide an event management investment operation method, an event management investment operation device and a computer-readable storage medium in view of the above-mentioned shortcomings, so as to solve the problem of how to efficiently operate event management investment.
[0006] In a first aspect, the present disclosure provides an event management input operation method, the method
[0007] The law includes:
[0008] Obtain description data of the event to be processed and values of multiple gradient parameters to be set, where the parameters to be set are the remaining processing parameters of the multiple processing parameters of the event except the target vector y, and the parameters to be set and the target vector y are respectively one of the input parameters reflecting the input of event processing and the return parameter reflecting the return of event processing;
[0009] The description data of the event to be processed and the value of each gradient parameter to be set are combined into a first feature matrix X, and the first feature matrix X is input into a pre-trained event governance analysis model to obtain a first value of the target vector y;
[0010] According to the marginal return of the first value of the target vector y and the value of the parameter to be set for obtaining the first value, the optimal value of the input parameter of the event to be processed is obtained.
[0011] Further, the description data of the event to be processed and the values of multiple gradient parameters to be set are obtained. The parameters to be set are the remaining processing parameters of the multiple processing parameters of the event except the target vector y. The parameters to be set and the target vector y are respectively one of the input parameters reflecting the input of event processing and the return parameter reflecting the return of event processing, specifically including:
[0012] The processing parameters of the event are defined, including the number of people involved in the event processing, the completion time and the public satisfaction reflecting the return of the event processing. The number of people involved is the target vector y, and the completion time and public satisfaction are the parameters to be set.
[0013] Obtain the first quantitative description data of the event to be processed, including the urgency of the event and the amount of task, obtain the values of completion time of multiple gradients at preset time intervals, and obtain the values of public satisfaction of multiple gradients at preset score intervals.
[0014] Furthermore, the method also includes pre-training the event governance analysis model based on historical event sample data, specifically including:
[0015] Obtaining description data of the historical event sample and values of processing parameters, and obtaining a second value of the target vector y according to the values of the processing parameters of the historical event sample;
[0016] The description data of the historical event samples and the values of the remaining processing parameters except the target vector y are combined into a second feature matrix X', and the second feature matrix X' of multiple historical event samples and the second value of the target vector y are used to train the event governance analysis model.
[0017] Furthermore, the event governance analysis model is trained using the second feature matrix X' of multiple historical event samples and the second value of the target vector y, specifically including:
[0018] Select the random forest algorithm as the event governance analysis model and import the basic module of the random forest algorithm from the software machine learning library scikitlearn;
[0019] The number of input features of the random forest algorithm is specified to be n, the random forest algorithm randomly selects the descriptive data in the second feature matrix X' to combine into n features including the values of the remaining processing parameters, and obtains the third value of the predicted target vector y according to the n features;
[0020] In response to the error between the third value and the second value of the target vector y obtained after training satisfying the first preset condition, the trained event governance analysis model is obtained.
[0021] Furthermore, after obtaining the trained event governance analysis model, the method further includes:
[0022] From the trained event management analysis model, select the n feature combinations that have the greatest impact on the third value of the target vector y whose output error meets the first preset condition. The n feature combinations with the greatest impact are urgency, task volume, completion time and public satisfaction.
[0023] Further, according to the marginal return of the first value of the target vector y and the value of the parameter to be set for obtaining the first value, the optimal value of the input parameter of the event to be processed is obtained, specifically including:
[0024] Classifying the first values of the target vector y and the values of the parameters to be set that obtain the corresponding first values, so as to obtain a marginal return classification reflecting the relationship between the amount of investment and the level of return;
[0025] Obtain the first value of a group of target vectors y close to low input and high return in the marginal return classification and the value of the parameter to be set corresponding to the first value, and obtain the value of the input parameter.
[0026] Further, obtaining the first value of a group of target vectors y close to the marginal return classification with low input and high return and the value of the parameter to be set corresponding to the first value, and obtaining the value of the input parameter, specifically includes:
[0027] The marginal return classification includes four categories: high return with low input, low return with low input, high return with high input, and low return with high input, which are obtained in advance based on the values of the processing parameters of the historical event samples;
[0028] In response to a group of first values of the target vector y and the values of the parameters to be set corresponding to the first values belonging to the category of low investment and high return, the values of the input parameters in the group are obtained; otherwise,
[0029] In response to the first value of the target vector y and the value of the parameter to be set that obtains the corresponding first value belonging to the classification of low return with low investment and high return with high investment, the value of the input parameter in the group of classifications in which similar historical events account for a large proportion is obtained.
[0030] Further, wherein:
[0031] The amount of investment is determined based on the number of people involved, and the return is determined based on a weighted comprehensive assessment of completion time and public satisfaction.
[0032] In a second aspect, the present disclosure provides an event management input operation device, the device
[0033] The settings include:
[0034] A data acquisition module is used to acquire description data of the event to be processed and values of multiple gradient parameters to be set, where the parameters to be set are the remaining processing parameters of the multiple processing parameters of the event except the target vector y, and the parameters to be set and the target vector y are respectively one of the input parameters reflecting the input of event processing and the return parameter reflecting the return of event processing;
[0035] A model analysis module, connected to the data acquisition module, is used to form a first feature matrix X with the description data of the event to be processed and the value of each gradient parameter to be set, and input the first feature matrix X into a pre-trained event governance analysis model to obtain a first value of the target vector y;
[0036] The parameter selection module is connected to the model analysis module and is used to obtain the optimal value of the input parameter of the event to be processed according to the marginal return of the first value of the target vector y and the value of the parameter to be set for obtaining the first value.
[0037] In a third aspect, the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the event governance investment operations method as described above is implemented.
[0038] The present disclosure provides an event governance input operation method, an event governance input operation device and a computer-readable storage medium, which combines input data or return data with description data as model input, and uses return data or input data as model output. The marginal return is calculated by combining the model input and output data, and the optimal event governance investment is obtained by considering the marginal return of event governance. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a flow chart of an event management input operation method according to an embodiment of the present disclosure;
[0040] Figure 2 is a flow chart of another event management input operation method according to an embodiment of the present disclosure;
[0041] Figure 3 is an example diagram of event classification according to an embodiment of the present disclosure;
[0042] Figure 4 It is a structural diagram of an event management input operation device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0043] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.
[0044] It should be understood that the specific embodiments and drawings described herein are only used to explain the present disclosure rather than to limit the present disclosure.
[0045] It can be understood that, in the absence of conflict, the various embodiments of the present disclosure and the various features in the embodiments can be combined with each other.
[0046] It can be understood that, for the convenience of description, the drawings of the present disclosure only show parts related to the present disclosure, while parts irrelevant to the present disclosure are not shown in the drawings.
[0047] It can be understood that each unit and module involved in the embodiments of the present disclosure may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.
[0048] It will be understood that, in the absence of conflict, the functions and steps marked in the flowcharts and block diagrams of the present disclosure may occur in an order different from that marked in the drawings.
[0049] It is understood that the flowcharts and block diagrams of the present disclosure illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present disclosure. Each box in the flowchart or block diagram may represent a unit, module, program segment, or code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or may be implemented by a combination of hardware and computer instructions.
[0050] It can be understood that the units and modules involved in the embodiments of the present disclosure can be implemented by software or hardware, for example, the units and modules can be located in a processor.
[0051] Embodiment 1:
[0052] like Figure 1 As shown, the present disclosure provides an event management input operation method,
[0053] Methods include:
[0054] S1. Obtain description data of an event to be processed and values of multiple gradient parameters to be set, where the parameters to be set are the remaining processing parameters of the event except the target vector y, and the parameters to be set and the target vector y are respectively one of an input parameter reflecting the input of event processing and a return parameter reflecting the return of event processing;
[0055] S2. Combining the description data of the event to be processed and the value of each gradient parameter to be set into a first feature matrix X, and inputting the first feature matrix X into a pre-trained event governance analysis model to obtain a first value of the target vector y;
[0056] S3. Obtain the optimal value of the input parameter of the event to be processed according to the marginal return of the first value of the target vector y and the value of the parameter to be set that obtains the first value.
[0057] In this embodiment, one of the input data or the return data is combined with the description data as the model input, and the return data or the input data is used as the model output. The marginal return is calculated by combining the model input and output data, and the optimal event governance input is obtained by considering the marginal return of event governance.
[0058] Specifically, the method for assisting governance input planning based on event data provided in this embodiment can also be used as follows: Figure 2 As shown, the steps include: S01, obtaining event processing data in the region, including input manpower, completed events, public satisfaction rate, etc.; S02, performing regression calculations on the events respectively through the random forest algorithm; S03, classifying the target events according to the event type to obtain a better investment method; S04, planning the event investment operation through the calculation results.
[0059] The present embodiment provides a method for assisting governance input operations based on event data, which collects event processing information within regions with the same degree of digitization, classifies these events into four categories using machine learning methods, and then calculates the marginal cost of each type of data to obtain a more reasonable allocation method to assist regional supervisors in more reasonable allocation of human resources in the region, thereby improving the completion rate of events in the region, the satisfaction rate of the masses, etc. It aims to solve the problem of unreasonable traditional allocation input methods, and provide a more efficient and accurate method for assisting the competent departments in the event input operations in the region, so as to improve feedback evaluations such as the completion rate and satisfaction rate of events.
[0060] In one embodiment, S1, obtaining description data of the event to be processed and values of multiple gradient parameters to be set, the parameters to be set are the remaining processing parameters of the multiple processing parameters of the event except the target vector y, the parameters to be set and the target vector y are respectively one of the input parameters reflecting the input of event processing and the return parameter reflecting the return of event processing, specifically including:
[0061] The processing parameters of the event are defined, including the number of people involved in the event processing, the completion time and the public satisfaction reflecting the return of the event processing. The number of people involved is the target vector y, and the completion time and public satisfaction are the parameters to be set.
[0062] Obtain the first quantitative description data of the event to be processed, including the urgency of the event and the amount of task, obtain the values of completion time of multiple gradients at preset time intervals, and obtain the values of public satisfaction of multiple gradients at preset score intervals.
[0063] In this embodiment, in step S01, in obtaining the event processing data in the region, the parameters used to classify the data include multiple dimensions, which can largely reflect the manpower and time required for the event, which is also a preparation for the marginal return calculation in the later stage. For example, a comprehensive judgment is made based on the dimensions of manpower input, time consumed to complete the event, whether it is completed within the specified time, and the satisfaction score of the masses. Specifically including:
[0064] 1.1) Data Collection
[0065] Obtain event processing data information in the region, and collect multi-dimensional data on event processing in the region in real time through multiple channels. These data include but are not limited to manpower input, event completion time, public satisfaction, event urgency, etc.
[0066] Human resources input: Human resources input refers to the allocation of human resources to specific tasks or projects to complete related work. Taking human resources input as a judgment indicator, horizontal comparison is made on the changes in completion time within a similar number of people (such as a difference of 2 people), and the impact on results such as completion rate and satisfaction rate.
[0067] Completion time: The time consumed for completion depends on factors such as the complexity of the task, the resources and manpower invested, the efficiency of team collaboration, and the effectiveness of project management. Take the completion time as a judgment indicator and compare the impact of the change in the number of people in the same period of time on the results such as completion rate and satisfaction rate.
[0068] Public satisfaction score: refers to an indicator that measures the public's satisfaction with the incident handling service. It is an important evaluation indicator used to assess the acceptance of public service quality. Public satisfaction rate is usually collected and evaluated through regular surveys and feedback mechanisms. Including questionnaires, verbal feedback, online ratings and comments, etc.
[0069] Event description data: for example, the urgency of an event. The event is defined according to the urgency of the task requirements, such as emergency, general, and long-term types. The event task volume, event impact scope, event risk, etc. are obtained based on the event description information. For example, for mass complaint events, the event description data is extracted based on the number of complaints, frequency, complaint content recognition, emotion recognition, etc. This part can be implemented by referring to existing technical means.
[0070] Among them, the processing parameters are first set with a variety of gradient parameter selection schemes according to the processing of historical events. For example, setting the number of people involved to two people every time, predicting the impact on the completion of the event and the public satisfaction rate, or setting the change in the number of people involved for every increase in the completion time requirement by a few hours and every increase in the public satisfaction rate by 5 points, so as to obtain a variety of possible event processing solutions.
[0071] Table 1 Classification parameter examples
[0072] serial number Investing in manpower Completion time Satisfied rating Urgency Task volume ... 001 3 1 91 urgent many ... 002 7 10 94 generally few ... 003 10 1 87 urgent generally ... 004 10 10 85 long many ... ... ... ... ... ... ... ...
[0073] 1.2) Data preprocessing
[0074] The collected historical event data is preprocessed to serve as sample data for model training. The preprocessing includes data cleaning, missing value filling, outlier detection, feature engineering, standardization and normalization to ensure data quality.
[0075] Data cleaning includes: deduplication, removing duplicate records to avoid statistical bias caused by duplicate data; format unification, converting all date, time and other fields into a unified format to facilitate subsequent time series analysis; coding consistency, coding categorical variables such as event urgency to ensure coding consistency and rationality.
[0076] Missing value processing includes: For numerical features, for missing values in numerical features, you can use the mean, median to fill, or use the K nearest neighbor algorithm for estimation; for categorical features, for missing values in categorical features, you can consider using the mode to fill, or create a new category.
[0077] Feature engineering includes: derived features, generating new features based on existing features, such as calculating event processing duration from event start and end times; feature selection, screening out features that have a significant impact on the target variable through correlation analysis and principal component analysis.
[0078] Standardization and normalization include: for numerical features, apply standardization (such as z-score standardization) or normalization (such as minimum-maximum scaling) to ensure that features of different scales have equal influence in model training.
[0079] In one embodiment, the method further includes pre-training the event governance analysis model based on historical event sample data, specifically including:
[0080] Obtaining description data of the historical event sample and values of processing parameters, and obtaining a second value of the target vector y according to the values of the processing parameters of the historical event sample;
[0081] The description data of the historical event samples and the values of the remaining processing parameters except the target vector y are combined into a second feature matrix X', and the second feature matrix X' of multiple historical event samples and the second value of the target vector y are used to train the event governance analysis model.
[0082] In this embodiment, the model is trained in advance based on historical event sample data, and then the trained model is used to perform input and return analysis of event governance. Specifically, as in step S02, the events are regressed by the random forest algorithm. The random forest improves the overall prediction performance by constructing multiple decision trees and combining their prediction results. In the random forest, each decision tree is trained on randomly selected features, which helps to reduce the risk of overfitting and improve the generalization ability of the model. Random forests can be used to complete a variety of tasks such as classification, regression, and feature selection. The data for numerical prediction using random forests includes a feature matrix X and a target vector y, such as taking the input of manpower as the target value y, and the remaining variables such as input time, urgency, and mass satisfaction as indicators X.
[0083] In one embodiment, the event governance analysis model is trained using the second feature matrix X' of multiple historical event samples and the second value of the target vector y, specifically including:
[0084] Select the random forest algorithm as the event governance analysis model and import the basic module of the random forest algorithm from the software machine learning library scikitlearn;
[0085] The number of input features of the random forest algorithm is specified to be n, the random forest algorithm randomly selects the descriptive data in the second feature matrix X' to combine into n features including the values of the remaining processing parameters, and obtains the third value of the predicted target vector y according to the n features;
[0086] In response to the error between the third value and the second value of the target vector y obtained after training satisfying the first preset condition, the trained event governance analysis model is obtained.
[0087] In this embodiment, the random forest algorithm is used. Random forest is an integrated learning method that improves the accuracy of prediction by constructing multiple decision trees and voting. Advantages include being more powerful than a single decision tree, having better generalization ability, being able to handle a large number of input features, and being able to provide feature importance scores. The random forest algorithm improves the accuracy and generalization ability of the model by integrating the predictions of multiple decision trees, solving the problems of linear assumptions, sensitivity to outliers, and limitations of feature selection of single regression algorithms. Its robustness, high-dimensional data processing capabilities, and feature importance evaluation functions enhance the explanatory power and prediction accuracy of the model. Therefore, random forest provides more stable and reliable results in marginal cost calculation. The random forest algorithm improves the accuracy and robustness of marginal cost calculation by integrating multiple decision trees and feature importance evaluation, reduces the limitations of the regression model, can solve the problem of unreasonable traditional allocation input methods, and provides a more efficient and accurate method for assisting the competent department in the operation of events in the region to improve feedback evaluations such as the satisfaction rate of event completion rate.
[0088] A specific example of random forest algorithm training is, including the steps:
[0089] 2.1) Import necessary libraries:
[0090] First, you need to import relevant modules in the scikitlearn library, such as datasets, model_selection, metrics, and ensemble:
[0091] from sklearn import datasets
[0092] from sklearn.model_selection import train_test_split
[0093] from sklearn.metrics import classification_report,accuracy_score
[0094] from sklearn.ensemble import RandomForestClassifier
[0095] 2.2) Load the dataset:
[0096] Next, load a dataset containing the time spent on completion, score, urgency, and satisfaction labels, and use make_classification to create a synthetic classification dataset to create a synthetic dataset containing 4 categories:
[0097] X,y=datasets.make_classification(n_samples=1000,n_features=4,n_informative=4,n_redundant=0,n_classes=4,random_state=42)
[0098] These parameters are used in the sklearn.datasets.make_classification function to generate a synthetic classification dataset. Here is the specific meaning of each parameter:
[0099] n_samples: The number of samples generated. Here we want to generate 1000 sample points.
[0100] n_features: The number of features in the dataset. Here, 4 features are specified.
[0101] n_informative: The number of features that help distinguish different categories. Here, 4 features contain the information needed to distinguish the categories.
[0102] n_redundant: The number of features that are completely correlated with other features. This is set to 0, meaning that all features are unique and none are redundant.
[0103] n_classes: The number of classes in the dataset. In this case, we want 4 different classes in the dataset.
[0104] random_state: A random number seed used to ensure that the data set generated each time the code is run is the same. It is set to 42 here to ensure the reproducibility of the results.
[0105] This function generates a synthetic dataset based on these parameters, which contains the specified number of samples, features and categories, and there is a certain correlation between the features (controlled by n_informative and n_redundant). Such a dataset can be used to test and demonstrate the performance of the classification algorithm.
[0106] 2.3) Split the dataset:
[0107] Use train_test_spli to split the data into training and test sets.
[0108] Split the dataset into training and testing sets:
[0109] X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.2,random_state=42)
[0110] The following are the meanings of the various parameters in the train_test_split function:
[0111] X: The sample feature set to be divided is a two-dimensional array, in which each row represents a sample and each column represents a feature.
[0112] y: The label set corresponding to X, which is a one-dimensional array in which each element represents the label of the corresponding sample.
[0113] test_size: specifies the proportion of the test set in the entire dataset. test_size = 0.2 means that the test set will contain 20% of the total number of samples.
[0114] random_state: A random number seed used to ensure that the data is divided in the same way each time the code is executed.
[0115] When you use this function, it returns four objects: features X_train for the training set, labels y_train for the training set, features X_test for the test set, and labels y_test for the test set. This way you can use X_train and y_train when training the model, and then use X_test and y_test when evaluating the model performance on the test set.
[0116] 2.4) Select the classifier:
[0117] Choose to use the Random Forest Classifier.
[0118] Creating a classifier instance
[0119] classifier=RandomForestClassifier(n_estimators=100,random_state=42)
[0120] 2.5) Training Model:
[0121] Use the training set data to train the model.
[0122] Training the model
[0123] classifier.fit(X_train,y_train)
[0124] 2.6) Make predictions:
[0125] Use the trained model to make predictions on the test set data.
[0126] Making predictions
[0127] y_pred=classifier.predict(X_test)
[0128] 2.7) Evaluate model performance:
[0129] Use appropriate evaluation metrics to assess the performance of the model, such as accuracy and classification reports.
[0130] Calculate accuracy
[0131] accuracy=accuracy_score(y_test,y_pred)
[0132] Among them, accuracy represents the accuracy of the model on the test set; y_test is the true label of the test set; y_pred is the predicted label of the model for the test set.
[0133] 2.8) Adjust parameters:
[0134] Depending on the performance of the model, the parameters of the classifier can be adjusted as necessary to optimize performance, usually involving techniques such as cross-validation and grid search.
[0135] The above steps outline the basic process of data classification. In actual applications, adjustments and optimizations may be required based on the specific data set and business needs of the parameters. For example, multiple feature dimensions such as event impact range and risk assessment can be added for classification and evaluation. After the four classification models are established, further modeling and analysis of various events are performed through personnel information to obtain the optimal solution for dispatching personnel.
[0136] Another specific example includes the steps of:
[0137] Data preparation: Prepare the data set, including the feature matrix X and the target vector y:
[0138] X is the feature matrix and y is the target vector
[0139] X=...
[0140] y=...
[0141] Split the dataset: Use the train_test_split function to split the dataset into training and test sets so that we can evaluate the performance of the model after training it:
[0142] X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.2,random_state=42)
[0143] Configure the random forest model: Create a random forest model instance and set appropriate parameters, such as the number of trees n_estimators, the number of features considered at each node mtry, etc.:
[0144] Configuring a Random Forest Regression Model
[0145] rf=RandomForestRegressor(n_estimators=100,random_state=42)
[0146] The n_estimators parameter refers to the number of decision trees in the random forest. In scikit-learn's RandomForestRegressor, this parameter defines the number of decision trees you want to build before making predictions.
[0147] The random_state parameter is used to set the seed of the random number generator, ensuring that the initialization and data partitioning of the random forest are the same each time the code is run.
[0148] Training model: Use the training set data X_train and y_train to train the random forest model:
[0149] rf.fit(X_train,y_train)
[0150] y_pred = rf.predict(X_test)
[0151] Model evaluation: Use the test set data X_test and y_test to evaluate the performance of the model. Common evaluation indicators include mean square error (MSE), determination coefficient (R^2), etc.:
[0152] mse=mean_squared_error(y_test,y_pred)
[0153] In this example, RandomForestRegressor is a random forest model for numerical prediction, the n_estimators parameter specifies the number of decision trees, and random_state is used to ensure the repeatability of the results. The model is trained by calling the .fit() method, and then the .predict() method is used to predict new samples. Finally, mean_squared_error is used to calculate the prediction error of the model.
[0154] In one embodiment, after obtaining the trained event governance analysis model, the method further includes:
[0155] From the trained event management analysis model, select the n feature combinations that have the greatest impact on the third value of the target vector y whose output error meets the first preset condition. The n feature combinations with the greatest impact are urgency, task volume, completion time and public satisfaction.
[0156] The existing commonly used methods for evaluating input production efficiency, such as Bayesian regression, estimate the change in total factor productivity by comparing the change in unit production efficiency between two time points. However, the disadvantages are the assumption of linear relationship, reliance on a large amount of data, susceptibility to outliers, multicollinearity, lack of attention to individual effects, and possible influence by sample selection bias. These problems will cause prediction errors when calculating marginal costs, resulting in inaccurate results. Therefore, in practical applications, caution should be exercised and corresponding measures should be taken to improve the reliability and accuracy of the model.
[0157] In this embodiment, the classification indicators used are more comprehensive, combining personnel, region, satisfaction rate, completion rate and other factors for analysis, providing more comprehensive information, solutions and decision-making suggestions. The random forest algorithm is used to overcome the inherent irrationality and inefficiency in traditional resource allocation methods. As an integrated learning method, random forest significantly improves the accuracy and stability of prediction by constructing multiple decision trees and integrating their prediction results. Compared with a single decision tree model, random forest has stronger generalization ability and can effectively cope with complex and changing situations. At the same time, random forest can handle a large number of input features, make full use of multi-dimensional data, and is particularly good at handling complex scenarios. It can effectively cope with dynamically changing environments and data sets, and provide more comprehensive information support for assisting the competent authorities in the operation of events in the region. In addition, random forest can also provide feature importance scores, which helps the competent authorities identify key factors and optimize resource allocation. In other words, the four input features of urgency, task volume, completion time and public satisfaction selected in this embodiment are obtained by training random forests based on historical events, and are the four features that have the greatest impact on the operation of event governance.
[0158] In one embodiment, obtaining the optimal value of the input parameter of the event to be processed according to the marginal return of the first value of the target vector y and the value of the parameter to be set for obtaining the first value specifically includes:
[0159] Classifying the first values of the target vector y and the values of the parameters to be set that obtain the corresponding first values, so as to obtain a marginal return classification reflecting the relationship between the amount of investment and the level of return;
[0160] Obtain the first value of a group of target vectors y close to low input and high return in the marginal return classification and the value of the parameter to be set corresponding to the first value, and obtain the value of the input parameter.
[0161] In this embodiment, marginal returns are obtained using classification methods, such as random forests, which can also be used to complete classification tasks. In specific algorithms, regression methods can be used as an alternative. By regression analyzing the quantitative indicators of specific events, a regression model can be established to predict the amount of resource input required to complete the event. Regression analysis can summarize the relationship between variables from existing data and be used to predict continuous output variables. In governance resource optimization, regression methods can be used to estimate the degree of influence of different factors on the outcome of event processing, thereby determining the best resource investment plan.
[0162] In one embodiment, obtaining a first value of a group of target vectors y close to low-input and high-return in the marginal return classification and obtaining the value of the parameter to be set corresponding to the first value, and obtaining the value of the input parameter specifically includes:
[0163] The marginal return classification includes four categories: high return with low input, low return with low input, high return with high input, and low return with high input, which are obtained in advance based on the values of the processing parameters of the historical event samples;
[0164] In response to a group of first values of the target vector y and the values of the parameters to be set corresponding to the first values belonging to the category of low investment and high return, the values of the input parameters in the group are obtained; otherwise,
[0165] In response to the first value of the target vector y and the value of the parameter to be set that obtains the corresponding first value belonging to the classification of low return with low investment and high return with high investment, the value of the input parameter in the group of classifications in which similar historical events account for a large proportion is obtained.
[0166] In this embodiment, step 03: classifying the target event according to the event type includes:
[0167] 3.1) Feature selection: Based on actual business needs and domain knowledge, select multiple dimensions that best reflect the characteristics of event processing, such as manpower input, completion time, satisfaction score, etc.
[0168] 3.2) Classification model and classification algorithm: Use the improved random forest algorithm for classification. Construct training sets and test sets of historical events, and use cross-validation and other techniques to optimize model parameters to ensure the accuracy and robustness of classification results.
[0169] According to their similarity, the classification results are as follows Figure 3 As shown, they are divided into: Category A has high returns with low resource input, Category B has low resource input and low returns, Category C has high resource input and high returns, and Category D has high resource input and low returns. Finally, the target event plans are classified into four different input-return types. In the process of establishing the training set, the events that have been completed in the area are counted to establish the model.
[0170] In one embodiment, wherein:
[0171] The amount of investment is determined based on the number of people involved, and the return is determined based on a weighted comprehensive assessment of completion time and public satisfaction.
[0172] In this embodiment, the marginal return calculation method is determined based on the various input and return factors considered for event management operations. In addition to the number of people invested, the input factors may also include the amount of money and time invested, and in addition to the completion time and public satisfaction, the return factors may also include the maintenance cycle, shelf life, etc. Step S04: Planning the event input operations based on the calculation results, including:
[0173] Strategy formulation: Based on the model prediction results, formulate detailed resource allocation and scheduling strategies to ensure the reasonable allocation of resources in events of different urgency and complexity. Specifically, it includes allocating appropriate human resources for each type of event and formulating a reasonable processing time frame.
[0174] Real-time adjustment: Introduce a real-time dynamic adjustment mechanism to continuously optimize the model and resource allocation strategy based on actual processing results and feedback, and improve overall processing efficiency and satisfaction. Through real-time monitoring and data analysis, dynamically adjust the resource allocation strategy to cope with changing needs and environments.
[0175] Effect evaluation: Regularly evaluate the effect of resource allocation strategies, and further optimize resource investment operations through monitoring and analysis of key indicators such as completion rate and satisfaction rate.
[0176] After completing the above calculation steps, the competent department can make more reasonable resource investment operations and plan resource investment more reasonably based on the results, thereby improving the event completion rate and public satisfaction rate. Compared with traditional risk assessment methods, this method can consider more dimensions and details, digitize "traditional experience", and conduct more reasonable and accurate analysis, greatly improving the efficiency of manpower investment and the level of event completion.
[0177] The advantages of this embodiment include:
[0178] 1) The use of random forests to analyze governance input operations can effectively take into account the complexity of event processing results being affected by multiple factors. The random forest algorithm is suitable for multi-classification problems, performs well when processing multi-category data, and has high prediction accuracy. Since event processing results are often affected by a combination of many factors, random forests can effectively capture and utilize these complex associations to provide accurate and reliable predictions and decision support. Applying the random forest algorithm to governance input operations analysis can help achieve more scientific and effective resource allocation and decision-making, thereby improving governance efficiency and the predictability of results.
[0179] 2) The random forest algorithm can calculate the contribution of each feature to the final prediction result, that is, the importance of the feature. In the allocation of governance resources, different resources can be allocated preferentially based on the feature importance obtained by the random forest algorithm to maximize the governance effect, achieve optimal configuration under limited resources, improve governance efficiency, optimize the decision-making process, and ultimately achieve better governance results.
[0180] 3) The method of governance resource investment operation introduces multi-dimensional feature selection, such as the field of resource investment, personnel information, public satisfaction rate, etc. At the same time, features can be supplemented according to the actual situation of the business, which can more comprehensively describe the situation of governance resource investment and improve the accuracy and interpretability of the classification method.
[0181] The method of this embodiment can be applied to a comprehensive information platform for social governance, integrating multi-source data resources, and comprehensively incorporating governance elements such as conflicts, production safety, and people's livelihood demands into the platform's real-time management and control, thereby achieving a deep integration of information technology and grassroots social governance, and mobilizing diverse social forces to jointly build a "precise network and micro-grid" to work together to efficiently solve people's problems and difficulties.
[0182] Embodiment 2:
[0183] like Figure 4 As shown, the present disclosure provides an event management investment operation device, the device comprising:
[0184] Data acquisition module 1, used to obtain description data of the event to be processed and values of multiple gradient parameters to be set, where the parameters to be set are the remaining processing parameters of the multiple processing parameters of the event except the target vector y, and the parameters to be set and the target vector y are respectively one of the input parameters reflecting the input of event processing and the return parameter reflecting the return of event processing;
[0185] The model analysis module 2 is connected to the data acquisition module 1 and is used to form a first feature matrix X with the description data of the event to be processed and the value of each gradient parameter to be set, and input the first feature matrix X into a pre-trained event governance analysis model to obtain a first value of the target vector y;
[0186] The parameter selection module 3 is connected to the model analysis module 2 and is used to obtain the optimal value of the input parameter of the event to be processed according to the marginal return of the first value of the target vector y and the value of the parameter to be set for obtaining the first value.
[0187] In one embodiment, the data acquisition module 1 specifically includes:
[0188] A data definition unit is used to define event processing parameters, including the number of people involved in event processing, the completion time and the public satisfaction rate, with the number of people involved as the target vector y and the completion time and the public satisfaction rate as the parameters to be set;
[0189] The data assignment unit is connected to the data definition unit and is used to obtain the first quantitative description data of the event to be processed, including the urgency of the event and the amount of task, obtain the values of the completion time of multiple gradients at preset time intervals, and obtain the values of the public satisfaction of multiple gradients at preset score intervals.
[0190] In one embodiment, the device further includes a model training module, specifically including:
[0191] A data sample unit, used to obtain description data and processing parameter values of the historical event sample, and obtain a second value of the target vector y according to the processing parameter values of the historical event sample;
[0192] The sample training unit is connected to the data sample unit and is used to form a second feature matrix X' with the descriptive data of the historical event samples and the values of the remaining processing parameters except the target vector y, and to train the event governance analysis model using the second feature matrices X' of multiple historical event samples and the second value of the target vector y.
[0193] In one implementation, the sample training unit specifically includes:
[0194] The algorithm selection subunit is used to select the random forest algorithm as the event management analysis model and import the basic module of the random forest algorithm from the software machine learning library scikitlearn;
[0195] A model setting subunit, connected to the algorithm selection subunit, for specifying the number of input features of the random forest algorithm as n, the random forest algorithm randomly selecting the descriptive data in the second feature matrix X' to combine into n features including the values of the remaining processing parameters, and obtaining a third value of the predicted target vector y according to the n features;
[0196] The training control subunit is connected to the model setting subunit, and is used to obtain the trained event governance analysis model in response to the error between the third value and the second value of the target vector y obtained after training satisfying the first preset condition.
[0197] In one embodiment, the sample training unit further includes:
[0198] The input selection subunit is connected to the training control subunit, and is used to obtain the trained event governance analysis model and select the four feature combinations that have the greatest impact on the third value of the target vector y whose output error meets the first preset condition. The four feature combinations with the greatest impact are urgency, task volume, completion time and public satisfaction.
[0199] In one embodiment, the parameter selection module 3 specifically includes:
[0200] A marginal return classification unit, used for classifying a plurality of first values of the target vector y and values of the parameters to be set for obtaining the corresponding first values, so as to obtain a marginal return classification reflecting the relationship between the amount of investment and the level of return;
[0201] The input parameter selection unit is connected to the marginal return classification unit, and is used to obtain the first value of a group of target vectors y close to the marginal return classification with low input and high return, and the value of the parameter to be set corresponding to the first value, thereby obtaining the value of the input parameter.
[0202] In one embodiment, the input parameter selection unit is specifically used to:
[0203] The marginal return classification includes four categories: high return with low input, low return with low input, high return with high input, and low return with high input, which are obtained in advance based on the values of the processing parameters of the historical event samples;
[0204] In response to a group of first values of the target vector y and the values of the parameters to be set corresponding to the first values belonging to the category of low investment and high return, the values of the input parameters in the group are obtained; otherwise,
[0205] In response to the first value of the target vector y and the value of the parameter to be set that obtains the corresponding first value belonging to the classification of low return with low investment and high return with high investment, the value of the input parameter in the group of classifications in which similar historical events account for a large proportion is obtained.
[0206] In one embodiment, wherein:
[0207] The amount of investment is determined based on the number of people involved, and the return is determined based on a weighted comprehensive assessment of completion time and public satisfaction.
[0208] Embodiment 3:
[0209] Embodiment 3 of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the event management investment and operation method as described in Embodiment 1 is implemented, or the event management investment and operation device as described in Embodiment 2 is implemented.
[0210] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.
[0211] In addition, the present disclosure may also provide a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the event management investment operations method as described in Example 1. The computer device may be the event management investment operations device as described in Example 2.
[0212] The memory is connected to the processor, the memory may be a flash memory or a read-only memory or other memory, and the processor may be a central processing unit or a single-chip microcomputer.
[0213] Embodiments 1-3 of the present disclosure provide an event governance investment operations method, an event governance investment operations device, and a computer-readable storage medium, which combine input data or return data with description data as model input, and use return data or input data as model output, and calculate marginal returns by combining model input and output data, so as to obtain the optimal event governance investment by considering the marginal returns of event governance.
[0214] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and substance of the present disclosure, and these modifications and improvements are also considered to be within the scope of protection of the present disclosure.
Claims
1. An event management input operation method, It is characterized in that The method comprises: Obtain description data of the event to be processed and values of multiple gradient parameters to be set, where the parameters to be set are the remaining processing parameters of the multiple processing parameters of the event except the target vector y, and the parameters to be set and the target vector y are respectively one of the input parameters reflecting the input of event processing and the return parameter reflecting the return of event processing; The description data of the event to be processed and the value of each gradient parameter to be set are combined into a first feature matrix X, and the first feature matrix X is input into a pre-trained event governance analysis model to obtain a first value of the target vector y; According to the marginal return of the first value of the target vector y and the value of the parameter to be set for obtaining the first value, the optimal value of the input parameter of the event to be processed is obtained.
2. The method according to claim 1, It is characterized in that Obtain description data of the event to be processed and values of multiple gradient parameters to be set. The parameters to be set are the remaining processing parameters of the multiple processing parameters of the event except the target vector y. The parameters to be set and the target vector y are respectively one of the input parameters reflecting the input of event processing and the return parameter reflecting the return of event processing, specifically including: The processing parameters of the event are defined, including the number of people involved in the event processing, the completion time and the public satisfaction reflecting the return of the event processing. The number of people involved is the target vector y, and the completion time and public satisfaction are the parameters to be set. Obtain the first quantitative description data of the event to be processed, including the urgency of the event and the amount of task, obtain the values of completion time of multiple gradients at preset time intervals, and obtain the values of public satisfaction of multiple gradients at preset score intervals.
3. The method according to claim 1 or 2, It is characterized in that The method also includes pre-training the event governance analysis model based on historical event sample data, specifically including: Obtaining description data of the historical event sample and values of processing parameters, and obtaining a second value of the target vector y according to the values of the processing parameters of the historical event sample; The description data of the historical event samples and the values of the remaining processing parameters except the target vector y are combined into a second feature matrix X', and the second feature matrix X' of multiple historical event samples and the second value of the target vector y are used to train the event governance analysis model.
4. The method according to claim 3, It is characterized in that The event governance analysis model is trained using the second feature matrix X' of multiple historical event samples and the second value of the target vector y, specifically including: Select the random forest algorithm as the event governance analysis model and import the basic module of the random forest algorithm from the software machine learning library scikitlearn; The number of input features of the random forest algorithm is specified to be n, the random forest algorithm randomly selects the descriptive data in the second feature matrix X' to combine into n features including the values of the remaining processing parameters, and obtains the third value of the predicted target vector y according to the n features; In response to the error between the third value and the second value of the target vector y obtained after training satisfying the first preset condition, the trained event governance analysis model is obtained.
5. The method according to claim 4, It is characterized in that After obtaining the trained event governance analysis model, the method further includes: From the trained event management analysis model, select the n feature combinations that have the greatest impact on the third value of the target vector y whose output error meets the first preset condition. The n feature combinations with the greatest impact are urgency, task volume, completion time and public satisfaction.
6. The method according to claim 3, It is characterized in that According to the marginal return of the first value of the target vector y and the value of the parameter to be set for obtaining the first value, the optimal value of the input parameter of the event to be processed is obtained, specifically including: Classifying the first values of the target vector y and the values of the parameters to be set that obtain the corresponding first values, so as to obtain a marginal return classification reflecting the relationship between the amount of investment and the level of return; Obtain the first value of a group of target vectors y close to low input and high return in the marginal return classification and the value of the parameter to be set corresponding to the first value, and obtain the value of the input parameter.
7. The method according to claim 6, It is characterized in that Obtaining the first value of a group of target vectors y close to low-input and high-return in the marginal return classification and the value of the parameter to be set corresponding to the first value, and obtaining the value of the input parameter, specifically includes: The marginal return classification includes four categories: high return with low input, low return with low input, high return with high input, and low return with high input, which are obtained in advance based on the values of the processing parameters of the historical event samples; In response to a group of first values of the target vector y and the values of the parameters to be set corresponding to the first values belonging to the category of low investment and high return, the values of the input parameters in the group are obtained; otherwise, In response to the first value of the target vector y and the value of the parameter to be set that obtains the corresponding first value belonging to the classification of low return with low investment and high return with high investment, the value of the input parameter in the group of classifications in which similar historical events account for a large proportion is obtained.
8. The method according to claim 6, It is characterized in that in: The amount of investment is determined based on the number of people involved, and the return is determined based on a weighted comprehensive assessment of completion time and public satisfaction.
9. An event management input operation device, It is characterized in that The device comprises: A data acquisition module is used to acquire description data of the event to be processed and values of multiple gradient parameters to be set, where the parameters to be set are the remaining processing parameters of the multiple processing parameters of the event except the target vector y, and the parameters to be set and the target vector y are respectively one of the input parameters reflecting the input of event processing and the return parameter reflecting the return of event processing; A model analysis module, connected to the data acquisition module, is used to form a first feature matrix X with the description data of the event to be processed and the value of each gradient parameter to be set, and input the first feature matrix X into a pre-trained event governance analysis model to obtain a first value of the target vector y; The parameter selection module is connected to the model analysis module and is used to obtain the optimal value of the input parameter of the event to be processed according to the marginal return of the first value of the target vector y and the value of the parameter to be set for obtaining the first value.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the event management investment operation method as described in any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Data governance value evaluation method based on index driving
CN121146560A
