Data processing method, device, equipment and dispatching system for garbage collection
By processing the historical data returned by garbage trucks and making model predictions, a garbage truck scheduling plan is generated, which solves the problem of mismatch in demand between garbage trucks and garbage sites, and improves garbage collection efficiency and prediction accuracy.
Patent Information
- Application Number
- CN202310161086.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-23
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2043-02-23
AI Technical Summary
In the existing technology, the needs of garbage trucks and garbage sites are not reasonably matched, resulting in low garbage collection and transportation efficiency.
By collecting historical data returned by garbage trucks, performing missing value filling and smoothing processing, training a seasonal differential autoregressive moving average model, predicting garbage production, and generating a garbage truck scheduling plan based on the prediction results to ensure the matching of garbage truck demand and supply. .
It improves the efficiency of garbage collection and transportation, avoids inefficiencies caused by unreasonable matching, reduces labor consumption and costs, and improves prediction accuracy.
Smart Images

Figure CN116167585B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device, equipment and dispatching system for garbage collection. Background Art
[0002] At present, the situation of "garbage siege" is serious, and garbage trucks are needed to collect and transport garbage in a timely manner, so as to transport the garbage to the garbage disposal site for treatment. In related technologies, in order to improve the efficiency of garbage collection and transportation, a dispatching platform can be set up to dispatch garbage trucks. However, in the current garbage truck dispatching method, the dispatched garbage trucks often do not match the actual needs of the garbage sites, and need to be re-dispatched, resulting in low efficiency of garbage collection and transportation. Summary of the invention
[0003] The present invention provides a data processing method, device, equipment and dispatching system for garbage collection, so as to solve the problem of low garbage collection efficiency caused by the mismatch between dispatched garbage trucks and actually required garbage trucks in the prior art, and realize high efficiency of garbage collection.
[0004] The present invention provides a data processing method for garbage collection and transportation, comprising:
[0005] Collect all historical data of garbage collection and transportation in the target area within a set time period sent back by garbage trucks, the historical data including the historical location, historical time period and historical garbage production of each garbage station in the target area;
[0006] Filling missing values for all the historical data to obtain first historical data;
[0007] Based on the first historical data, determining the relationship between the location and time period of the garbage site and the garbage production;
[0008] Based on the relationship, the location of the target garbage site in the target area and the target time period, the garbage production of the target garbage site in the target time period is determined.
[0009] According to the data processing method for garbage collection and transportation provided by the present invention, the relationship is obtained by training a time series analysis model, and the training method of the time series analysis model includes:
[0010] Based on the first historical data, the time series analysis model is trained to obtain a garbage production prediction model.
[0011] According to the data processing method for garbage collection and transportation provided by the present invention, the time series analysis model includes a seasonal difference autoregressive sliding average model.
[0012] According to the data processing method for garbage collection and transportation provided by the present invention, before training the time series analysis model, the method further includes:
[0013] The grid hyperparameter optimization algorithm is used to determine the hyperparameters of the model.
[0014] According to the data processing method for garbage collection and transportation provided by the present invention, based on the first historical data, a time series analysis model is trained to obtain a garbage production prediction model, including:
[0015] Determine an optimal window function according to the hyperparameter and the first historical data;
[0016] Using the optimal window function to smooth the first historical data, to obtain second historical data;
[0017] The historical position in the second historical data and the historical time period in the second historical data are used as inputs, and the historical garbage production in the second historical data is used as a label to train the time series analysis model to obtain the garbage production prediction model.
[0018] The data processing method for garbage collection and transportation provided by the present invention also includes:
[0019] A garbage truck dispatching plan corresponding to the target garbage site and the target time period is generated according to the garbage production of the target garbage site in the target time period.
[0020] The present invention also provides a data processing device for garbage collection and transportation, comprising:
[0021] A data acquisition module, used to collect all historical data of the garbage collection and transportation process in the target area within a set time period transmitted by the garbage truck, the historical data including the historical location, historical time period and historical garbage production of each garbage station in the target area;
[0022] A data filling module, used for filling missing values in all the historical data to obtain first historical data;
[0023] A relationship determination module, used to determine the relationship between the location and time period of the garbage site and the garbage output based on the first historical data;
[0024] The garbage production determination module is used to determine the garbage production of the target garbage site in the target time period based on the relationship, the location of the target garbage site in the target area, and the target time period.
[0025] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data processing method for garbage collection and transportation as described in any one of the above items is implemented.
[0026] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the data processing method applied to garbage collection and transportation as described in any one of the above is implemented.
[0027] The present invention also provides a garbage collection and transportation scheduling system, including a server and a garbage truck, wherein the server is used to execute any of the above-mentioned data processing methods applied to garbage collection and transportation, and schedule the garbage truck based on the execution result.
[0028] The present invention provides a data processing method, device, equipment and dispatching system for garbage collection and transportation. In the method, all historical data of the garbage collection and transportation process in the target area within a set time period transmitted back by the garbage truck are collected, and missing values are filled in all the historical data to obtain the first historical data. Based on the first historical data, the relationship between the location and time period of the garbage station and the garbage output is determined. Based on the relationship and the location and target time period of the target garbage station in the target area, the garbage output of the target garbage station in the target time period is determined. The above data processing method determines the relationship between the location and time period of the garbage station and the garbage output, and then determines the garbage output of the target garbage station in the target time period, so that the garbage truck can be dispatched according to the calculated garbage output in the target time period, thereby matching the demand for garbage trucks with the supply of garbage trucks, and avoiding the defect of low garbage collection efficiency caused by unreasonable garbage truck matching in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 It is a flow chart of a data processing method applied to garbage collection and transportation provided by the present invention;
[0031] Figure 2 It is a schematic diagram of a sliding window algorithm in a data processing method for garbage collection and transportation provided by the present invention;
[0032] Figure 3 It is a structural schematic diagram of a data processing device for garbage collection and transportation provided by the present invention;
[0033] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] Combine the following Figure 1-Figure 4 The invention describes a data processing method, device, equipment and dispatching system for garbage collection and transportation.
[0036] Figure 1 It is a flow chart of a data processing method applied to garbage collection and transportation provided by the present invention.
[0037] like Figure 1 As shown, the present invention provides a data processing method for garbage collection and transportation, the execution subject can be a central processing unit, and mainly includes the following steps:
[0038] 101. Collect all historical data of garbage collection and transportation in the target area within a set time period sent back by the garbage truck.
[0039] Among them, historical data includes the historical location, historical time period and historical garbage production of each garbage site in the target area.
[0040] It should be noted that historical data can be obtained from multiple garbage trucks, and any garbage truck that collects and transports garbage in the target area can be the object of historical data collection. All historical data when collecting and transporting garbage in the target area within a set time period can be all historical data when collecting and transporting garbage in the target area within a certain historical period, or all historical data when collecting and transporting garbage in the target area within all historical periods.
[0041] In a specific implementation process, vehicle-side sensors can be installed on garbage trucks that collect and transport garbage in the target area. The vehicle-side sensors may include multiple sensors such as weight sensors, GPS sensors, and time measurement sensors. The vehicle-side sensors transmit historical data back to the database for storage, so that historical data can be extracted from the database later. Among them, the database can be a MySQL database. As an example, the above process can be achieved by collecting loT data from the vehicle-side sensors and transmitting it to the distributed message queue kafka, and consuming topics from kafka and storing them in the MySQL database. Furthermore, Python can be used to connect to the MySQL database to read historical GPS data, historical garbage generation time period data, and garbage production data in the database.
[0042] Among them, the GPS data provided by the GPS sensor can represent the driving track of the garbage truck, and the location information of the garbage truck can be analyzed through the driving track. The time measurement sensor provides time data. By combining GPS data and time data, the time when the garbage passes each position on the driving track can be obtained. According to the length of time spent at each position, combined with the load-bearing capacity of the garbage truck collected by the weight sensor, the location of the garbage station in the driving track of the garbage truck can be obtained. Specifically, the location information of the garbage truck includes the latitude and longitude of the garbage truck.
[0043] By associating the GPS sensor, weight sensor and time measurement sensor on the vehicle side, we can obtain data such as the time when the garbage truck collects and transports garbage at different garbage stations, the weight of garbage collected and transported, and the volume of garbage collected and transported. The garbage output is represented by the weight of garbage collected and transported and the volume of garbage collected and transported.
[0044] Furthermore, the above-mentioned various types of garbage data can be sorted and tabulated so that the data can be clearly viewed and processed later. For example, for each garbage station, the garbage collection time at its location can be matched with the garbage collection weight and volume, and the weight and volume of garbage collected in different collection time periods can be displayed. For each garbage station, a data curve for the garbage station can be formed with the garbage collection time as the horizontal axis and the garbage collection weight as the vertical axis.
[0045] It should be pointed out that the above-mentioned sensor types and the types of data collected are not limited to the types mentioned above. In actual applications, multiple sensors can be set to collect multiple data types according to specific needs, which will not be listed one by one here.
[0046] 102. Fill missing values in historical data to obtain first historical data.
[0047] Taking into account the phenomenon that some historical data may be uploaded as null values, the missing value filling method is used to complete this part of the data. Specifically, any of a variety of methods such as the average value filling method, the adjacent value filling method, the median filling method, etc. can be used to fill in the data according to the actual situation.
[0048] In some embodiments, after the missing values are filled, the historical data may be smoothed, and specifically, a sliding window algorithm may be used for the smoothing process.
[0049] Figure 2 The schematic diagram of the sliding window algorithm is shown below. Figure 2 As shown, the sliding window size is set to 3. Each time the sliding window passes through the array, the sum of the elements in the current sliding window is calculated to obtain the result res.
[0050] Selecting the sliding window algorithm can smooth the data curve and apply the data curve to obtain the accuracy of the relationship between the location and time period of the garbage site and the garbage output in the subsequent step 103. Specifically, the sliding window can smooth the data curve in the following way: setting the window size and the digital function, assuming that the window is set to 4, each calculation will slide from left to right to form a new window, and the window setting function, the calculation result can effectively reflect the characteristics of the original data.
[0051] After the missing values are filled and smoothed as described above, a data set is obtained, and the data set is divided into a training set, a test set, and a validation set for use in training, testing, and validating the model in subsequent steps.
[0052] 103. Based on the first historical data, determine the relationship between the location and time period of the garbage site and the garbage output.
[0053] In some embodiments, the above relationship is obtained by training a time series analysis model, and the training method of the time series analysis model includes: training the time series analysis model based on the first historical data to obtain a garbage production prediction model.
[0054] Among them, time series analysis models include ARIMA model (autoregressive differential moving average model) and SARIMA model (seasonal autoregressive differential moving average model).
[0055] The SARIMA model is an extension of the ARIMA model, which explicitly supports univariate time series data with seasonal components. Here, the SARIMA model is taken as an example to illustrate the solution of this application.
[0056] The SARIMA prediction formula is:
[0057]
[0058] There are three parameters in the above formula that need to be configured:
[0059] p: Trend autoregressive order AR(P):
[0060]
[0061] d: trend difference order (the number of one-step differences of I(d));
[0062] q: Trend Moving Average Sequential MA(q):
[0063] x t =θ0+θ1∈ t-1 +…+θ p ∈ t-p +∈ t
[0064] In addition, there are four parameters that need to be configured:
[0065] P: Seasonal autoregressive order:
[0066] x t =α0+α1x t-1 +…+α p x t-p +∈ t
[0067] D: seasonal difference order (number of seasonal differences);
[0068] Q: Seasonal moving average order:
[0069] x t =β0+β1∈ t-s +β2∈ t-2s +…+β q ∈ t-QS +∈ t
[0070] m: The number of time steps in a seasonal cycle.
[0071] In some embodiments, before training the time series analysis model, it also includes: using a grid hyperparameter optimization algorithm to determine the hyperparameters of the time series analysis model.
[0072] After the model is determined, the grid hyperparameter optimization algorithm is used to optimize the model to improve the model accuracy. The model parameter range is selected as follows: p_params = [0,1,2], d_params = [0,1], q_params = [0,1,2], t_params = ['n', 'c', 't', 'ct'], P_params = [0,1,2], D_params = [0,1], Q_params = [0,1,2], m_params = seasonal. The above parameters are combined to train the model, and the test set is used to test the result error (the split method of the test set and the training set can be selected as 3:7). The RMSE is used for comparison and evaluation to select the optimal hyperparameter optimization result, and the optimal hyperparameters of the model are saved for new data prediction.
[0073] As an optional implementation, the above-mentioned training of the time series analysis model based on the first historical data to obtain the garbage production prediction model includes: determining the optimal window function according to the hyperparameters and the first historical data; using the optimal window function to smooth the first historical data to obtain the second historical data; using the historical position in the second historical data and the historical time period in the second historical data as input, and using the historical garbage production in the second historical data as a label, to train the time series analysis model to obtain the garbage production prediction model.
[0074] Considering that there may be sudden inflection point data in the historical data, and the window function randomly selected in the smoothing process after the missing value filling in the above step 102 is not enough to overcome the data inflection point problem, it is necessary to determine the best window function based on the determined hyperparameters of the SARIMA model. In the process of determining the best window function, the input data and output data of the model are also needed. Specifically, by calculating the difference between the actual output data and the true output data corresponding to the window value of each randomly selected sliding window, the window value corresponding to the minimum difference between the actual output data and the true output data is selected as the best window value, and then the optimal window function is obtained. For example, the optimal window function can be W_params=[2,3,4,5,6,7,8]. The calculated optimal window function w is used to smooth the data curve to further improve the prediction accuracy of the model.
[0075] After the optimal window function is determined, the first historical data is smoothed using the optimal window function to obtain the second historical data.
[0076] In the subsequent model training process, the historical position in the second historical data and the historical time period in the second historical data are used as input, and the historical garbage production in the second historical data is used as a label to train the time series analysis model to obtain a garbage production prediction model.
[0077] After the model is trained, the validation set can be used to validate the model.
[0078] After the time series analysis model is trained, the garbage production prediction model obtained can represent the relationship between the location and time period of the garbage station and the garbage production. Subsequently, the garbage production of any garbage station in the target area during the target time period can be determined based on this relationship.
[0079] 104. Determine the garbage production of the target garbage station in the target time period based on the relationship, the location of the target garbage station in the target area, and the target time period.
[0080] After determining the garbage production of the target garbage site in the target time period, the data results can be inserted into a new table in the MySQL database for subsequent query use.
[0081] As an optional implementation, the above data processing method applied to garbage collection and transportation may also include: generating a garbage truck scheduling plan corresponding to the target garbage site and the target time period according to the garbage production of the target garbage site in the target time period.
[0082] In a specific implementation process, the following method can be used to dispatch garbage trucks: after the central processor determines the garbage production of each garbage station in the target area within the target time period according to the above scheme, it also calculates the number of garbage trucks required to be dispatched according to the garbage production of each garbage station in the target area within the target time period and the garbage production that each garbage truck can collect and transport. The central processor can be connected to the server, and the server is connected to the garbage trucks. The garbage trucks include several vehicles. Each garbage truck is used to send its location to the processor via the server. The processor determines the garbage truck closest to the target garbage station as the target garbage truck according to the location information of each garbage truck and the location information of the target garbage station where garbage collection and transportation is required. The target garbage truck is used to go to the target garbage station for garbage collection and transportation. The processor can also plan the garbage collection and transportation route for each target garbage truck according to the garbage production of each target garbage station in the target time period, the location of each target garbage truck and the garbage production that the target garbage truck can collect and transport, thereby generating a dispatching scheme for multiple target garbage stations and multiple target garbage trucks. The processor sends the generated dispatching scheme to the server, so that the server dispatches the garbage truck according to the dispatching scheme.
[0083] In another specific implementation process, the following method can also be used to dispatch garbage trucks: Considering that there are time regulations for the removal of garbage trucks in some areas, for example, it is stipulated that the garbage truck responsible for a certain garbage collection and transportation route collects and transports garbage once a day, and each collection and transportation time is 5:00 pm. However, at 12:00 noon, the central processor determines that the garbage output of some garbage stations in the route has seriously exceeded the garbage output that can be held by the garbage bins of the garbage stations. In order to keep the environment clean, the garbage truck responsible for the route needs to collect and transport the garbage in time. Therefore, after the central processor sends the garbage output to the server, the server will immediately dispatch the garbage truck responsible for the route to the target garbage station for garbage collection and transportation according to the garbage output.
[0084] In another specific implementation process, the following method can also be used for garbage truck scheduling: considering that some areas arrange workload for garbage truck drivers through manual scheduling, when the central processor determines the garbage production of the target garbage site within a certain target time period in the future (for example, next week or next month), the garbage production data is sent to the terminal of the scheduling personnel, and the scheduling personnel arranges the working hours of each garbage truck according to the garbage production of the target garbage site within the target time period.
[0085] The above method of the present invention calculates the garbage production of each target garbage site in the target area within the target time period and reasonably dispatches garbage trucks, thereby matching the demand for garbage trucks with the supply of garbage trucks, thereby avoiding the defect of low garbage collection efficiency caused by unreasonable matching of garbage trucks in the prior art.
[0086] In addition, the solution provided by the present invention also has the following advantages:
[0087] (1) Machine learning is used instead of traditional statistics and empirical knowledge to predict garbage production, which avoids the defect of using manual statistical historical data to predict future garbage production in the prior art, which may cause low statistical accuracy in the short term due to the large amount of historical data required. Therefore, the present invention not only reduces continuous labor consumption and costs, but also improves the accuracy of the results.
[0088] (2) The optimal sliding window value is determined based on the model's hyperparameters, and then the data is smoothed using the optimal window value, thereby avoiding the inaccuracy of the model caused by the inflection point problem in the data, improving the accuracy of the model, and further improving the accuracy of the garbage production of the target garbage site predicted by the model during the target time period.
[0089] (3) The data processing method of the present invention applied to garbage collection and transportation provides reference value and research and development ideas for multiple directions including personnel management, vehicle management, etc., and helps to adopt relevant strategies in advance.
[0090] The data processing device for garbage collection and transportation provided by the present invention is described below. The data processing device for garbage collection and transportation described below and the data processing method for garbage collection and transportation described above can be referenced to each other.
[0091] Figure 3 It is a structural schematic diagram of a data processing device applied to garbage collection and transportation provided by the present invention.
[0092] like Figure 3 As shown, the present invention provides a data processing device for garbage collection and transportation, comprising:
[0093] The data acquisition module 201 is used to collect all historical data of garbage collection and transportation in the target area within a set time period transmitted by the garbage truck, and the historical data includes the historical location, historical time period and historical garbage production of each garbage station in the target area;
[0094] A data filling module 202 is used to fill missing values in all the historical data to obtain first historical data;
[0095] A relationship determination module 203, for determining the relationship between the location and time period of the garbage site and the garbage output based on the first historical data;
[0096] The garbage production determination module 204 is used to determine the garbage production of the target garbage site in the target time period based on the relationship, the location of the target garbage site in the target area, and the target time period.
[0097] In some embodiments, the relationship mentioned in the relationship determination module 203 is obtained by training a time series analysis model. The above-mentioned data processing device applied to garbage collection and transportation also includes a training module, which is used to obtain the above-mentioned relationship by training a time series analysis model. The training method of the time series analysis model includes: based on the first historical data, the time series analysis model is trained to obtain a garbage production prediction model.
[0098] Among them, time series analysis models include ARIMA model (autoregressive differential moving average model) and SARIMA model (seasonal autoregressive differential moving average model).
[0099] The SARIMA model is an extension of the ARIMA model, which explicitly supports univariate time series data with seasonal components. Here, the SARIMA model is taken as an example to illustrate the solution of this application.
[0100] In some embodiments, the training module is specifically used to: determine the hyperparameters of the time series analysis model using a grid hyperparameter optimization algorithm.
[0101] After the model is determined, the grid hyperparameter optimization algorithm is used to optimize the model to improve the model accuracy. The model parameter range can be: p_params = [0,1,2], d_params = [0,1], q_params = [0,1,2], t_params = ['n', 'c', 't', 'ct'], P_params = [0,1,2], D_params = [0,1], Q_params = [0,1,2], m_params = seasonal. The above parameters are combined to train the model, and the test set is used to test the result error (the split method of the test set and the training set can be selected as 3:7). The RMSE is used for comparison and evaluation to select the optimal hyperparameter optimization result, and the optimal hyperparameters of the model are saved for new data prediction.
[0102] As an optional implementation, the training module is specifically used to: determine the optimal window function based on the hyperparameters and the first historical data; use the optimal window function to smooth the first historical data to obtain the second historical data; use the historical position in the second historical data and the historical time period in the second historical data as input, and use the historical garbage production in the second historical data as labels to train the time series analysis model to obtain a garbage production prediction model.
[0103] Considering that there may be sudden inflection point data in historical data, it is also necessary to determine the best window function based on the determined hyperparameters of the SARIMA model. In the process of determining the best window function, the input data and output data of the model are also needed. Specifically, by calculating the difference between the actual output data and the true output data corresponding to the window value of each randomly selected sliding window, the window value corresponding to the smallest difference between the actual output data and the true output data is selected as the best window value, and then the optimal window function is obtained. The calculated optimal window function is used to smooth the data curve to further improve the prediction accuracy of the model.
[0104] After the optimal window function is determined, the first historical data is smoothed using the optimal window function to obtain the second historical data.
[0105] In the subsequent model training process, the historical position in the second historical data and the historical time period in the second historical data are used as input, and the historical garbage production in the second historical data is used as a label to train the time series analysis model to obtain a garbage production prediction model.
[0106] As an optional implementation, the above-mentioned data processing device applied to garbage collection and transportation may also include: a scheduling plan generation module, which is used to generate a garbage truck scheduling plan corresponding to the target garbage site and the target time period according to the garbage production of the target garbage site in the target time period.
[0107] An electronic device provided by the present invention is described below.
[0108] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a data processing method applied to garbage collection and transportation, the method comprising:
[0109] Collect all historical data of garbage collection and transportation in the target area within the set time period sent back by garbage trucks. The historical data includes the historical location, historical time period and historical garbage production of each garbage station in the target area;
[0110] Filling missing values in historical data to obtain first historical data;
[0111] Based on the first historical data, determining the relationship between the location and time period of the garbage site and the garbage production;
[0112] Based on the relationship and the location of the target garbage station in the target area and the target time period, the garbage production of the target garbage station in the target time period is determined.
[0113] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a 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: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0114] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the data processing method for garbage collection and transportation provided by the above methods, the method includes:
[0115] Collect all historical data of garbage collection and transportation in the target area within the set time period sent back by garbage trucks. The historical data includes the historical location, historical time period and historical garbage production of each garbage station in the target area;
[0116] Filling missing values in historical data to obtain first historical data;
[0117] Based on the first historical data, determining the relationship between the location and time period of the garbage site and the garbage production;
[0118] Based on the relationship and the location of the target garbage station in the target area and the target time period, the garbage production of the target garbage station in the target time period is determined.
[0119] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the data processing method for garbage collection and transportation provided by the above methods, the method comprising:
[0120] Collect all historical data sent back by garbage trucks when collecting and transporting garbage in the target area. The historical data includes the historical location, historical time period and historical garbage production of each garbage station in the target area;
[0121] Filling missing values in historical data to obtain first historical data;
[0122] Based on the first historical data, determining the relationship between the location and time period of the garbage site and the garbage production;
[0123] Based on the relationship and the location of the target garbage station in the target area and the target time period, the garbage production of the target garbage station in the target time period is determined.
[0124] In another aspect, the present invention further provides a garbage collection and transportation scheduling system, comprising a server and a garbage truck; the server is used to execute the data processing method applied to garbage collection and transportation provided by the above methods, and schedule the garbage truck based on the execution result. Among them, the data processing method applied to garbage collection and transportation includes:
[0125] Collect all historical data of garbage collection and transportation in the target area within the set time period sent back by garbage trucks. The historical data includes the historical location, historical time period and historical garbage production of each garbage station in the target area;
[0126] Filling missing values in historical data to obtain first historical data;
[0127] Based on the first historical data, determining the relationship between the location and time period of the garbage site and the garbage production;
[0128] Based on the relationship and the location of the target garbage station in the target area and the target time period, the garbage production of the target garbage station in the target time period is determined.
[0129] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0130] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data processing method for garbage collection and transportation, characterized in that: include: Collect all historical data of garbage collection and transportation in the target area within a set time period sent back by garbage trucks, the historical data including the historical location, historical time period and historical garbage production of each garbage station in the target area; Filling missing values in the historical data to obtain first historical data; Based on the first historical data, determine the relationship between the location and time period of the garbage site and the garbage output, the relationship is obtained by training a time series analysis model, the time series analysis model includes a seasonal difference autoregressive sliding average model, and before training the time series analysis model, it also includes using a grid hyperparameter optimization algorithm to determine the hyperparameters of the time series analysis model, wherein after the model is determined, the model is optimized using a grid hyperparameter optimization algorithm to improve the model accuracy, and the model parameter range is selected as: p_params=[0,1,2], d_params=[0,1], q_params=[0,1,2], t_params=['n','c','t','ct'], P_params=[0,1,2], D_params=[0,1], Q_params=[0,1,2], m_params=seasonal, the above parameters are combined to train the model, and the test set is used to test the result error, and the RMSE is used for evaluation. Compare and select the best hyperparameter optimization result, and save the model's optimal hyperparameters for new data prediction, wherein the training method of the time series analysis model includes training the time series analysis model based on the first historical data to obtain a garbage production prediction model, specifically including determining the optimal window function based on the hyperparameters and the first historical data. In the process of determining the optimal window function, it is necessary to use the input data and output data of the model, calculate the difference between the actual output data and the real output data corresponding to the window value of each randomly selected sliding window, select the window value corresponding to the minimum difference between the actual output data and the real output data as the best window value, and then obtain the optimal window function; use the optimal window function to smooth the first historical data to obtain the second historical data; use the historical position in the second historical data and the historical time period in the second historical data as input, and use the historical garbage production in the second historical data as a label to train the time series analysis model to obtain the garbage production prediction model; Based on the relationship, the location of the target garbage site in the target area, and the target time period, the garbage production of the target garbage site in the target time period is determined.
2. The data processing method for garbage collection and transportation according to claim 1 is characterized in that: Also includes: A garbage truck dispatching plan corresponding to the target garbage site and the target time period is generated according to the garbage production of the target garbage site in the target time period.
3. A data processing device for garbage collection and transportation, characterized in that: include: A data acquisition module, used to collect all historical data of garbage collection and transportation in the target area within a set time period transmitted by the garbage truck, the historical data including the historical location, historical time period and historical garbage production of each garbage station in the target area; A data filling module, used for filling missing values in all the historical data to obtain first historical data; A relationship determination module is used to determine the relationship between the location and time period of the garbage site and the garbage output based on the first historical data, wherein the relationship is obtained by training a time series analysis model, wherein the time series analysis model includes a seasonal difference autoregressive sliding average model, and before training the time series analysis model, it also includes using a grid hyperparameter optimization algorithm to determine the hyperparameters of the time series analysis model, wherein after the model is determined, the model is optimized using a grid hyperparameter optimization algorithm to improve the model accuracy, and the model parameter range is selected as follows: p_params=[0,1,2], d_params=[0,1], q_params=[0,1,2], t_params=['n','c','t','ct'], P_params=[0,1,2], D_params=[0,1], Q_params=[0,1,2], m_params=seasonal, the above parameters are combined to train the model, and the test set is used to test the result error, and the evaluation method is used RMSE is compared to select the best hyperparameter optimization result, and the model's optimal hyperparameters are saved for new data prediction, wherein the training method of the time series analysis model includes training the time series analysis model based on the first historical data to obtain a garbage production prediction model, specifically including determining the optimal window function according to the hyperparameters and the first historical data. In the process of determining the optimal window function, the input data and output data of the model need to be used, and the difference between the actual output data and the real output data corresponding to the window value of each randomly selected sliding window is calculated, and the window value corresponding to the minimum difference between the actual output data and the real output data is selected as the best window value, thereby obtaining the optimal window function; the first historical data is smoothed by using the optimal window function to obtain the second historical data; the historical position in the second historical data and the historical time period in the second historical data are used as input, and the historical garbage production in the second historical data is used as a label to train the time series analysis model to obtain the garbage production prediction model; The garbage production determination module is used to determine the garbage production of the target garbage site in the target time period based on the relationship, the location of the target garbage site in the target area, and the target time period.
4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the data processing method applied to garbage collection and transportation as claimed in claim 1 or 2 is implemented.
5. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data processing method for garbage collection and transportation as claimed in claim 1 or 2 is implemented.
6. A garbage collection and transportation dispatching system, characterized in that: It includes a server and a garbage truck; the server is used to execute the data processing method applied to garbage collection and transportation as described in claim 1 or 2, and dispatch the garbage truck based on the execution result.
