A smart garden management method, device, system and storage medium
By adopting video surveillance, image recognition, prediction model and reinforcement learning technologies in smart garden management, we optimize the cleaning path and waste placement points, and solve the neglected problem of tourists' impact and waste generation trends in the existing technology, and achieve the goal of achieving Efficient cleaning and excellent tourist experience.
Patent Information
- Application Number
- CN202411426158.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-14
AI Technical Summary
When formulating cleaning time periods and routes, the existing smart garden management methods lack the impact of the cleaning process on tourists' normal tours. They have not studied the trends of waste generation in various areas and the reasons behind it. They have not made reasonable decisions on the location of waste disposal points. optimization.
By installing video surveillance equipment, we collect tourist activities and waste data from various areas of the garden, combine garden layout information to establish a tourist behavior prediction model, use image recognition technology to identify waste types and density, evaluate cleaning time, and optimize waste disposal points The location and number of places and numbers are used to optimize cleaning paths to reduce interference to tourists.
It has achieved the realization that cleaning personnel can complete cleaning tasks more efficiently, reduce duplication and ineffective labor, improve overall cleaning efficiency, reduce interference from tourists during the tour, and improve tourists' satisfaction and experience.
Smart Images

Figure CN118940930B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of garden management, and in particular to a smart garden management method, device, system and storage medium. Background Art
[0002] In communities, parks and other garden scenes, there is often a common problem, that is, the fallen plants and the garbage brought by people and animals have an adverse impact on the environment. In related technologies, there are usually cleaners who clean up the garbage in the garden during a specific period of time, but due to the large area of the garden, relying solely on the cleaning of the cleaners may not achieve a good cleaning effect. Therefore, how to ensure that the environment in the garden is in a good state is an urgent problem to be solved.
[0003] The document with the prior art publication number CN117035217A provides a smart garden management method, device, system and storage medium, which obtains the usage type and status of each use area in the garden, collects images through monitoring equipment to determine the usage of different areas; based on planning information and monitoring image analysis, determines the area to be cleaned, the type of waste and the amount of cleaning; according to the type of waste and the amount of cleaning, formulates detailed plans such as cleaning time, route and tools to ensure cleaning efficiency; combines the flow information of garden personnel and garbage bin monitoring to predict the garbage carrying capacity trend and reasonably arrange the cleaning time to improve cleaning efficiency.
[0004] Although the existing technology has improved the efficiency of garden management to a certain extent, there are still some limitations. For example, the existing cleaning plan mainly formulates the cleaning period and route based on the type and amount of waste, lacks consideration of the impact of the cleaning process on the normal visit of tourists, does not conduct in-depth research on the trend and reasons behind the generation of waste in each area, and does not optimize the rationality of the location of waste disposal points.
[0005] In view of this, the present application proposes a smart garden management method, device, system and storage medium. Summary of the invention
[0006] 1. Technical problems to be solved.
[0007] The purpose of this application is to provide a smart garden management method, device, system and storage medium, which solves the technical problems raised in the above-mentioned background technology, and realizes that through intelligent path planning and optimization of waste disposal points, cleaning personnel can complete cleaning tasks more efficiently, reduce repetitive and ineffective labor, and thus improve the overall cleaning efficiency; by reducing the cleaning work in areas with dense tourist populations, the interference to tourists during the tour is reduced, and the satisfaction of tourists and the overall experience of the technical effect are improved.
[0008] 2. Technical solution.
[0009] The present invention provides a smart garden management method, device, system and storage medium, and the technical solution includes the following aspects.
[0010] According to one aspect of an embodiment of the present application, a smart garden management method is provided, comprising the following steps.
[0011] S1. By installing video surveillance equipment, image data of visitor activities and waste in various areas of the garden are collected.
[0012] S2. Combine the construction layout and information of the garden to establish a tourist behavior prediction model to predict the tourist density and flow trend in each area.
[0013] S3. Use image recognition technology to process monitoring images of each area to identify waste type, density and distribution location.
[0014] S4. Combine environmental data to assess the estimated processing time for each area and analyze the reasons for waste density and distribution.
[0015] S5. Determine the radiation range of waste disposal points based on the waste analysis results, and adjust the quantity demand of waste disposal points and add new waste disposal points based on the utilization efficiency, traffic flow and area of existing waste disposal points.
[0016] S6. Based on visitor flow trend prediction and waste density analysis, use reinforcement learning to optimize the cleaning staff's processing path, prioritize cleaning during times and routes with fewer tourists, and reduce interference with tourists.
[0017] S7. Monitor the execution of cleaning tasks in real time, and evaluate cleaning efficiency and visitor experience based on feedback from cleaning staff and visitors.
[0018] As an optional solution of the present invention, in step S1, a video surveillance device is used to obtain video data of each tourist area and each connecting path in the garden, and a video analysis technology is used to extract key frames from a continuous video stream. The key frames can capture the activity status of visitors in the tourist areas and connecting paths. For each video, the extraction frequency of the key frames is determined according to the activity changes of the visitors to ensure that the extracted frames can represent the typical status in different time periods, and the extracted key frames are preprocessed to improve the accuracy of feature extraction. The influence of environmental noise on the image data is removed, and the image is standardized to reduce unnecessary variable interference.
[0019] As an optional solution of the present invention, in step S2, based on the construction layout of the garden, the garden is abstracted into a graph structure G=(V,E), where the node V represents each tourist area in the garden, and the edge E represents the path connecting different areas. The graph structure has node attributes and edge attributes. Each node vi ∈V represents a tourist area. The node attributes include the number of tourists, regional characteristics and environmental information. The number of tourists represents the density of tourists in a certain period of time. The regional characteristics include the area A i , landscape type and green coverage, using the feature vector C i Indicates; environmental information is the current weather conditions, using an environmental feature vector E i t Represents. Edge attributes, each edge e ij ∈E represents region v i and v j The attributes of the connected paths between them include path length and congestion level. The path length represents the physical distance between regions, denoted by D ij ; Crowding level, calculated based on tourist flow data on the route.
[0020] The spatiotemporal graph convolutional network ST-GCN model is used to predict the visitor flow trend of each tourist area in the garden in the future, the number of tourists in each area and the congestion of the connecting paths. For the constructed garden graph G=(V,E), its state at different times t is represented by G t =(V t ,E t ) represents, where V t is the set of all nodes at time t, i.e., the tour area; E t is the set of all edges at time t, i.e., paths. The changes in the attributes of each node and edge in the time series can constitute a spatiotemporal graph sequence input. Each node v i t The attribute is represented as a feature vector x i t . The spatial convolution layer extracts spatial features from nodes and neighboring nodes through graph convolution operations. The temporal convolution layer uses a one-dimensional convolution operation to convolve the time series of node features to capture temporal dynamic changes. By stacking multiple layers of spatiotemporal convolution layers, the model is able to capture the complex spatiotemporal dependencies between nodes and edges. The last layer outputs the predicted value of each node and edge. The loss function is optimized through backpropagation and the model parameters are gradually adjusted.
[0021] As an optional solution of the present invention, in step S3, surveillance videos of each tourist area in the garden are obtained from the video surveillance equipment. For each area, key frame images are extracted regularly for subsequent target detection and waste classification. A semantic segmentation model based on a convolutional neural network is used to detect and classify waste in the image. The semantic segmentation model divides the input image into regions of multiple categories, each category being represented by blocks of different colors. The semantic segmentation model U-Net is pre-trained using labeled data and fine-tuned for garden scenes to improve its classification effect for specific waste types. The loss function uses cross entropy loss for semantic segmentation optimization. The semantic segmentation model is used to classify the pixels in the image and generate a category segmentation map. Each type of waste is divided into blocks of different colors. By calculating the pixel area of each color block, the number and coverage area of different types of waste are obtained. By counting the area of each type of waste, the waste density of each area can be calculated. Based on the results of semantic segmentation, a heat map can be generated to visualize the distribution density of various types of waste in different areas.
[0022] As an optional solution of the present invention, in step S4, the cleaning time of each area is estimated based on the waste density and regional attributes, and a linear regression model is used to establish the relationship between waste density and cleaning time. The semantic segmentation model based on the convolutional neural network in step S3 is used to extract the part classified as man-made waste, and the extracted man-made waste is further analyzed to obtain its density and distribution characteristics. The key frame images of each area are spatially analyzed to calculate the density D of man-made waste in different areas. i and distribution P i . Analyze the distribution of man-made waste at different distances from the waste placement point, and calculate the density of man-made waste as a function of distance d from the waste placement point j. i,j Analyze the impact of the space usage of waste disposal points on waste density, and calculate the used space C of the waste disposal points according to the waste density. j used and the remaining space C j remaining , analyze the waste density D i Analyze the impact of the number of tourists on the density and distribution of waste, and analyze the number of tourists L in area i. i and anthropogenic waste density D i relationship.
[0023] As an optional solution of the present invention, in step S5, the radiation range of the waste placement point is calculated, and the radiation range R of each waste placement point j is calculated using the above analysis results. j. Calculate the utilization efficiency of existing waste disposal points, and calculate the number of waste disposal points required by the flow of people and the area. Optimize and add new waste disposal points, for high utilization efficiency, such as E j >0.8 and the radiation range is insufficient, consider adding more delivery points or expanding the capacity of existing delivery points; for areas with low utilization efficiency, such as E j <0.3, consider relocating or removing the placement points and reallocating them to other more efficient areas; in areas with high traffic volume and large area but insufficient radiation range of existing placement points, according to the calculated demand M i Add new waste disposal points.
[0024] As an optional solution of the present invention, in step S6, the cleaning path is optimized by using a graph structure combined with reinforcement learning. Based on the graph structure G=(V, E) constructed in step S2, the node attributes and edge attributes of the graph structure are changed as the state s of reinforcement learning. t , the node attribute is the waste density M(v i ), waste density in the node area; estimated cleaning time T(v i ), the time required to clean the node area; predict the tourist density D(v i ,t), the tourist density at a certain time period t in the future. The edge attribute is the path length L(e ij ), the physical distance or walking time between two tourist areas; predicting the crowding level C(e ij ,t), the degree of congestion at a certain time point t in the future. Action a t The next node is selected based on the current node, that is, a path is selected to move in the graph. Specifically, the cleaner is currently at node v i , you can choose to go to any adjacent node v j , reward function R(s t ,a t ) The design goal is to reduce the impact on tourists and improve the cleaning efficiency. The following factors are considered to reduce the impact on tourists. Negative rewards are given for passing through areas or paths with high predicted tourist density in the future; maximize cleaning efficiency. Cleaners are given positive rewards when passing through areas with high waste density and large waste disposal points; minimize path length. Reduce the path length of cleaners and give positive rewards; shortest time reward. According to the expected cleaning time of the node and the expected travel time of the edge, negative rewards are given to encourage the selection of the path that can complete the cleaning task in the shortest time. Use the reinforcement learning method based on the graph convolutional network to learn the optimal path planning strategy, with the goal of maximizing the cumulative reward.
[0025] As an optional solution of the present invention, in step S7, the optimal path planning result generated by the reinforcement learning model is obtained from step S6. The path is given in the form of a graph structure, the node represents the area to be cleaned, and the edge represents the path connecting different areas. The path planning result not only includes the cleaning order of each node, but also includes the moving path, estimated cleaning time and estimated travel time information between nodes. The path planning result is parsed to generate detailed operation instructions for each cleaning staff, including the cleaning order, cleaning area, moving path and estimated cleaning time. A mobile terminal device based on GPS or other positioning technology is used to provide real-time navigation for the cleaning staff to guide them to move in the garden according to the optimal path. If the environmental conditions change, the system will adjust the path and cleaning plan in real time and update the operating instructions of the cleaning staff. In the actual operation process, the system will continuously monitor the progress of the cleaning staff and environmental changes, such as the actual cleaning time and waste disposal situation. According to the actual cleaning progress and monitoring data, the cleaning plan is dynamically adjusted to optimize the path selection and cleaning efficiency.
[0026] According to one aspect of an embodiment of the present application, a smart garden management device is provided, including.
[0027] The data collection module, including video surveillance equipment, collects data on visitor activities in various areas of the garden to obtain real-time visitor behavior, garden usage and waste conditions.
[0028] The visitor behavior prediction module combines the construction layout and information of the garden to build a visitor behavior prediction model to predict the density and flow trend of tourists in each area.
[0029] The waste identification module processes the collected monitoring images of each area through image processing and feature recognition technology to identify and classify the type, density and distribution location of waste.
[0030] The waste analysis module combines environmental data to evaluate the estimated processing time for each area and analyze the reasons for waste density and distribution.
[0031] The waste placement point optimization and adjustment module determines the radiation range of waste placement points based on the waste analysis results; adjusts the quantity demand of waste placement points and adds new waste placement points based on the utilization efficiency, traffic flow and area of existing waste placement points.
[0032] The cleaning path optimization module uses reinforcement learning algorithms to optimize the cleaning paths of cleaning staff based on visitor behavior predictions and waste density assessment results, and prioritizes cleaning during times and routes with fewer tourists to reduce interference with tourists' normal visits.
[0033] The cleaning efficiency evaluation module monitors the execution of cleaning tasks in real time, collects feedback from cleaning staff and tourists, and comprehensively evaluates cleaning efficiency and tourist experience.
[0034] According to one aspect of an embodiment of the present application, a smart garden management system is provided, the system comprising the following hardware and software components.
[0035] Hardware components include, but are not limited to, servers for storing and processing data and running the backend services of the smart garden management system. Data collection equipment for real-time monitoring of visitor activities and waste conditions in the garden. Cleaning equipment, including various cleaning tools and garbage collection vehicles, for performing cleaning tasks. Mobile terminals, including tablets and smartphones, for use by managers and cleaners to receive tasks and feedback information in real time.
[0036] Software components include, but are not limited to, data processing and analysis software, which is used to process the collected data and perform visitor behavior prediction, waste identification and analysis tasks. User interface, which is an interactive interface provided to managers and visitors, and is used to display the progress of cleaning tasks, visitor density and waste distribution information. Communication module, which is responsible for data transmission and communication between various components of the system.
[0037] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned smart garden management method.
[0038] 3. Beneficial effects.
[0039] Compared with the prior art, the present application has the following beneficial effects.
[0040] 1. Through intelligent path planning and optimization of waste placement points, cleaning personnel can complete cleaning tasks more efficiently, reduce duplication and ineffective labor, and thus improve overall cleaning efficiency.
[0041] 2. By reducing the cleaning work in tourist-dense areas, the disturbance to tourists during their visit can be reduced, thus improving tourists’ satisfaction and overall experience.
[0042] 3. The system can dynamically adjust the cleaning plan according to environmental changes and actual cleaning progress to ensure that the cleaning work is always in the best state. At the same time, real-time feedback data helps to continuously optimize system performance.
[0043] 4. By predicting waste density and visitor behavior, the system can rationally allocate cleaning resources, ensure the rational layout of waste disposal points and the effective scheduling of cleaning personnel. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A flow chart of a smart garden management method provided for one embodiment of the present application.
[0045] Figure 2 A structural diagram of a smart garden management device provided for one embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0047] Please refer to Figure 1 , the present application provides a smart garden management method, comprising the following steps.
[0048] S1. By installing video surveillance equipment, image data of visitor activities and waste in various areas of the garden are collected.
[0049] S2. Combine the construction layout and information of the garden to establish a tourist behavior prediction model to predict the tourist density and flow trend in each area.
[0050] S3. Use image recognition technology to process monitoring images of each area to identify waste type, density and distribution location.
[0051] S4. Combine environmental data to assess the estimated processing time for each area and analyze the reasons for waste density and distribution.
[0052] S5. Determine the radiation range of waste disposal points based on the waste analysis results, and adjust the quantity demand of waste disposal points and add new waste disposal points based on the utilization efficiency, traffic flow and area of existing waste disposal points.
[0053] S6. Based on the visitor flow trend and waste density analysis, use reinforcement learning to optimize the cleaning staff's processing path, prioritize cleaning during times and routes with fewer tourists, and reduce interference with tourists.
[0054] S7. Monitor the execution of cleaning tasks in real time, and evaluate cleaning efficiency and visitor experience based on feedback from cleaning staff and visitors.
[0055] Furthermore, in step S1, video surveillance equipment is used to obtain video data of each tourist area and each connected path in the garden, and video analysis technology is used to extract key frames from continuous video streams. Key frames can capture the activity status of visitors in the tourist areas and connected paths, such as stillness, movement, and gathering. For each video, the extraction frequency of key frames is determined according to the changes in visitor activities (such as the speed and direction of movement, gathering and dispersion) to ensure that the extracted frames can represent the typical status in different time periods, and the extracted key frames are preprocessed; blurred, unclear or blocked images are removed to improve the accuracy of feature extraction. The influence of environmental noise (such as changes in lighting and weather) on image data is removed, and the image is standardized to reduce unnecessary variable interference.
[0056] Furthermore, in step S2, based on the construction layout of the garden, the garden is abstracted into a graph structure G=(V,E), where the node V represents each tourist area in the garden, and the edge E represents the path connecting different areas. The graph structure has node attributes and edge attributes; node attributes, each node v i ∈V represents a tourist area, and its attributes include the number of tourists, regional characteristics, and environmental information. The number of tourists refers to the number of tourists in a certain period of time. The target detection model YOLO is used to detect tourists from the key frames of the surveillance video extracted in step S1. The model draws a rectangular box in the image to identify and count tourists. For a certain tourist area, that is, node v i , its key frame I i t The number of tourists in i t The number of detected rectangular boxes is counted; regional characteristics, including the area A i , landscape type and green coverage rate. Landscape types include grassland, lakes and buildings, etc., and the feature vector C i Indicates that C i =[A i , landscape type code, green coverage rate]; environmental information is the current weather conditions, including temperature, humidity and rainfall, using an environmental feature vector E i t Indicates that E i t =[temperature, humidity, wind speed, weather type code]. Edge attributes, each edge e ij ∈E represents region v i and v j The attributes of the connected paths between regions include path length and congestion level. Path length represents the physical distance or actual walking time between regions, which can be directly measured or obtained from geographic information system (GIS) data and is denoted as D ijThe degree of congestion is calculated based on the tourist flow data on the path. The number of path rectangles detected by the target detection model from the key frames of the surveillance video is combined with the path area or width to estimate. ij The degree of congestion C ij t , expressed as follows, C ij t =∑ k∈Pij (N ij t / A ij ), where P ij Indicates path e ij The set of all detection areas, N ij t For path e ij The number of tourists at time t, that is, the number of target detection rectangles, A ij For path e ij area or width.
[0057] The spatiotemporal graph convolutional network (ST-GCN) model is used to predict the visitor flow trend of each tourist area in the garden in the future, the number of tourists in each area, and the congestion of the connecting paths. The main structure of the ST-GCN model includes: a spatial convolution layer, which performs convolution operations on the graph structure data to extract the spatial features of the node and its neighboring nodes; a temporal convolution layer, which performs convolution operations on the time series to capture the changes in node attributes over time. For the constructed garden graph G=(V,E), its state at different times t is represented by G t =(V t ,E t ) indicates that, where V t ={v1 t ,v2 t ,…,v n t} is the set of all nodes at time t, n is the number of regions; v n t It refers to a specific node at time t, that is, a specific tourist area in the garden. t ={e ij t} is the set of all edges at time t. The changes in the attributes of each node and edge in the time series can constitute a spatiotemporal graph sequence input, X={G t ,G t-1 ,…,G t-T+1}, where T is the length of the observation time window. Each node v i t The attribute is represented as a feature vector x i t , x it =[N i t ,C i ,E i t ], where N i t is the number of tourists obtained by target detection, C i are regional characteristics, including area, landscape type and green coverage, E i t is environmental information, including weather conditions. ij t The property of is expressed as, e ij t =[D ij ,C ij t ], where D ij is the path length, i.e. the physical distance; C ij t is the congestion level of the path, calculated based on the tourist flow and path area. The spatial convolution layer extracts spatial features from nodes and neighboring nodes through graph convolution operations. For a node v i , and its update rule is, h i (l+1) =σ{∑ j∈N(i) {W (l) h j (l) / [(d i d j ) 1 / 2 ]+b (l)}}, where h i (l) is the node v at layer l i The hidden features of node v i The set of neighbor nodes, d i is node v i Degree, W (l) and b (l) is a trainable parameter of the lth layer, and σ(·) is an activation function, such as ReLU. It captures the relationship between nodes and neighboring nodes in the spatial structure. The temporal convolution layer uses a one-dimensional convolution operation to convolve the time series of node features to capture the temporal dynamic changes. For node v i , the temporal convolution operation is,h i (l+1,t) =Conv1D(h i (l,t:t-K+1) ;W t (l) ), where h i (l,t:t-K+1) Represents node v iThe feature sequence from time t to t-K+1, K is the size of the temporal convolution kernel, W t (l) is the parameter of the temporal convolution kernel; Conv1D is a one-dimensional convolution operation. By stacking multiple layers of spatiotemporal convolution layers, the model can capture the complex spatiotemporal dependencies between nodes and edges. The last layer outputs the predicted value of each node and edge. For each node v i The model outputs the tourist density characteristics in the future time periods t+1, t+2, …, t+H, d^ i t+h =f ST-GCN (G t ,G t-1 ,…,G t-T+1 ),h=1,2,…,H, where H is the number of time steps for prediction. i t+h Represents node v i The density characteristics of tourists at the future time step t+h. h is the index of the future time step, ranging from 1 to H. f ST−GCN is a function of the spatiotemporal graph convolutional network (ST-GCN) model, which takes input and outputs a node v i Visitor density characteristics at future time steps.
[0058] G t Represents the state of the garden graph at the current time step t, including nodes (tourist areas) and their connection relationships. t-1 , G t-2 , ..., G t-T+1 represents the historical state of the garden graph from the current time step t to T-1 time steps ago. T is the size of the historical time window, which is used to capture the changes in the graph structure in the past time period. The loss function is optimized by backpropagation and the model parameters are gradually adjusted. Similarly, for each edge e ij , the model outputs the congestion level in the future time period, C^ ij t+h =g ST-GCN (G t ,G t-1 ,…,G t-T+1 ),h=1,2,…,H. In the formula, C ij t+h Represents the slave node v i To node v j The congestion level of the edge at the future time t+h. h is the future time step. ST-GCN is a function of the spatiotemporal graph convolutional network (ST-GCN) model, which takes input and outputs the predicted degree of crowding. t Represents the state of the garden graph at the current time step t, including nodes (tourist areas) and their connection relationships. t-1, G t-2 , ..., G t-T+1 Represents the historical state of the garden graph from the current time step t to T-1 time steps ago. T is the size of the historical time window, which is used to capture the changes in the graph structure in the past time period.
[0059] The model training process uses supervised learning methods and real historical data for training. The loss function can be in the following form: L = ∑ i∈V ∑ h=1 H (d^ i t+h -d i t+h ) 2 +∑ (i,j)∈E ∑ h=1 H (C^ ij t+h -C ij t+h ) 2 , where L is the loss function used in the model training process, which is used to measure the difference between the model prediction value and the true value. i t+h Represents node v i The actual number of tourists at the future time t+h. d^ i t+h Node v representing the model prediction i The number of tourists at the future time t+h. C ij t+h Represents the slave node v i To node v j The actual congestion level of the edge at the future time t+h. ij t+h Represents the slave node v predicted by the model i To node v j The congestion level of the edge at the future time t+h. By optimizing this loss function, the optimal model parameters can be learned.
[0060] Further, in step S3, the surveillance video of each tourist area in the garden is obtained from the video surveillance equipment in step S1. For each area, key frame images are extracted regularly for subsequent target detection and waste classification. According to the input size requirements of the neural network, the image is scaled to a uniform size, and the effective area where waste may exist is cropped. The image quality is enhanced by adjusting the brightness and contrast to improve the model's ability to detect and classify waste under different lighting conditions. A semantic segmentation model based on a convolutional neural network CNN, such as U-Net, is used to detect and classify waste in the image. The semantic segmentation model can classify each pixel of the image to generate a segmentation map for waste identification and classification. The semantic segmentation model divides the input image into multiple categories of regions, each category represented by a color block of a different color. For example: man-made waste, such as plastic bags, bottles, paper scraps, etc., is represented by one color; natural waste, such as leaves, branches, and other waste naturally generated by animals and plants, is represented by another color. The semantic segmentation model U-Net is pre-trained using labeled data and fine-tuned for garden scenes to improve its classification effect on specific waste types. The loss function uses cross entropy loss for semantic segmentation optimization. The semantic segmentation model is used to classify the pixels in the image and generate a category segmentation map. Each type of waste is segmented into blocks of different colors. By calculating the pixel area of each color block, the number and coverage area of different types of waste are obtained. By counting the area of each type of waste, the waste density of each area can be calculated. The density calculation formula is as follows, D i c =A i c / A i , where D i c represents the density of waste of category c in region i, A i c is the total area of waste of category c in region i, A i is the total area of region i. Based on the results of semantic segmentation, a heat map can be generated to visualize the distribution density of various types of waste in different regions.
[0061] Further, in step S4, the cleaning time of each area is estimated based on the waste density and regional attributes, and a linear regression model is used to establish the relationship between waste density and cleaning time, T i =αD i +βAttribute i +γ, where T i is the estimated cleaning time of area i, D i is the waste density of region i, Attribute iRepresents other attributes of region i and the node attributes described in step S2. α, β, and γ are the parameters of the regression model. The semantic segmentation model based on the convolutional neural network in step S3 is used to extract the part classified as man-made waste. The extracted man-made waste is further analyzed to obtain its density and distribution characteristics. The key frame images of each region are spatially analyzed to calculate the density D of man-made waste in different regions. i and distribution P i , D i = amount of man-made waste / area, P i (x,y)=f(waste location), where D i represents the density of anthropogenic waste in region i; P i (x, y) represents the distribution characteristics of man-made waste at coordinate (x, y) in region i. Analyze the distribution of man-made waste at different distances from the waste placement point, and calculate the man-made waste density as the distance d from the waste placement point j increases. i,j Changes in B ij , B ij =f(d i,j ), the function f can be obtained by fitting the actual data to analyze the waste density distribution at different distances. Analyze the impact of the space usage of the waste placement point on the waste density, and calculate the waste density according to the used space C of the placement point. j used and the remaining space C j remaining , analyze the waste density D i The impact of D i =g(C j used ,C j remaining ), function g describes the relationship between the use of the placement point and the waste density. Analyze the impact of the number of tourists on the waste density and distribution, and analyze the number of tourists L in area i i and anthropogenic waste density D i relationship, D i =h(L i ), function h describes the effect of the number of tourists on the waste density.
[0062] Further, in step S5, the radiation range of the waste placement point is calculated, and the radiation range R of each waste placement point j is calculated using the analysis result of step S4. j , R j =argmax{d i,j ∣ D ij ≤τ}, where τ is the set waste density threshold, which is used to determine the effective service radius of the delivery point. Calculate the utilization efficiency of the existing waste delivery points, Ej =U j / C j , where U j is the used capacity of the delivery point j, the average value over a period of time, C j is the total capacity of the delivery point, if E j If it is close to 1 for a long time, for example > 0.8, it means that the deployment point is in a high utilization state and it may be necessary to increase the capacity or add a new deployment point. j If it is low for a long time, for example <0.3, you can consider reducing the capacity or relocating the waste collection point. Calculate the number of waste collection points required by the flow of people and the area. For a specific area i, the number of waste collection points required M i It can be calculated based on the following formula, M i =(U i ×A i ) / (C avg ×R avg ), where U i is the average flow of people in area i; A i is the area of region i; C avg is the average capacity of the delivery point; R avg is the average radiation range area of the waste placement point. Optimizing and adding waste placement points is very effective for high utilization efficiency, such as E j >0.8 and the radiation range is insufficient, consider adding more delivery points or expanding the capacity of existing delivery points; for areas with low utilization efficiency, such as E j <0.3, consider relocating or removing the placement points and reallocating them to other more efficient areas; in areas with high traffic volume and large area but insufficient radiation range of existing placement points, according to the calculated demand M i Add new waste disposal points.
[0063] Furthermore, in step S6, the cleaning path is optimized by using the graph structure combined with reinforcement learning. Based on the graph structure G = (V, E) constructed in step S2, the node attributes and edge attributes of the graph structure are changed as the state s of reinforcement learning. t , the node attribute is the waste density M(v i ); the waste density of the node area can be calculated by the density of different types of waste detected in step S3; the estimated cleaning time T(v i ) is the time required to clean the node area, which can be obtained by the linear regression model in step S4; predict the tourist density D(v i ,t), the tourist density at a certain time period t in the future is predicted by the ST-GCN model in step S2. The edge attribute is the path length L(e ij ), the physical distance or walking time between two tourist areas; predicting the crowding level C(eij ,t), the degree of congestion at a future time point t is predicted by the ST-GCN model in step S2. Action a t The next node is selected based on the current node, that is, a path is selected to move in the graph. Specifically, the cleaner is currently at node v i , you can choose to go to any adjacent node v j , corresponding to edge e ij ∈E,at={v i →v j}, reward function R(s t ,a t )The design goal is to reduce the impact on tourists and improve the cleaning efficiency. The following factors are considered to reduce the impact on tourists. Negative rewards are given for areas or paths with high predicted tourist density in the future; to maximize cleaning efficiency, positive rewards are given for cleaners passing through areas with high waste density and large waste disposal points; to minimize path length, positive rewards are given for reducing the path length of cleaners; and shortest time rewards are given based on the estimated cleaning time of nodes and the estimated travel time of edges, negative rewards are given to encourage the selection of the path that can complete the cleaning task in the shortest possible time. The reward function can be expressed as, R(s t ,a t )=w1×(-D(v j ,t)-C(e ij ,t))+w2×(M(v j )+U(v j ))-w3×L(e ij )-w4×(T(v j )+P(e ij )), where D(v j ,t) is the node v in time period t j The tourist density, C(e ij ,t) is the edge e in time period t ij The degree of crowding; M(v j ) is the node v j The waste density, U(v j ) is the used space of the waste placement point, that is, the ratio of the used space to the capacity; L(e ij ) is the path length, T(v j ) is the node v j The estimated cleanup time is estimated based on the waste density and area factors, P(e ij ) is the edge e ijThe estimated travel time can be estimated based on the path length and the current congestion level; w1, w2, w3, w4 are coefficients for adjusting the weights of different reward items to balance the importance of different factors. The optimal path planning strategy is learned using a reinforcement learning method based on a graph convolutional network. The goal is to maximize the cumulative reward, π * (s)=argmax π E[∑ t=0 T Q t R(s t ,a t )], where π * (s) is the optimal policy in state s, which is a mapping from states to actions to maximize the cumulative reward. π is the indicator function of the maximum value of parameter π, indicating that we are looking for a strategy π that maximizes the expected cumulative reward. E is the expectation operator, which is used to calculate the expected value of the cumulative reward under strategy π. t is a discount factor, where Q∈[0,1]. The discount factor is used to balance the importance of recent rewards and distant rewards. The closer Q is to 1, the greater the impact of distant rewards; the closer Q is to 0, the greater the impact of recent rewards. R(s t ,a t ) is the state s at time step t t and action a t The training process is to initialize the model parameters and use the graph convolution network GCN to initialize the weights of the neural network; the graph convolution operation encodes the node and edge features in the graph structure into a low-dimensional embedding vector through GCN to capture the dependencies and spatiotemporal features between regions in the graph structure; collect experience, the cleaner performs actions according to the current strategy and records the state transition (s t ,a t ,R(s t ,a t ),s t+1 ); experience replay, sampling state transition samples from the experience pool, used to train the neural network and update the policy parameters; policy update, based on the policy gradient or value iteration method, update the parameters of the policy network and optimize the path planning strategy; repeat the training and iterate the above process until the model converges to a stable optimal strategy.
[0064] Further, in step S7, the optimal path planning result generated by the reinforcement learning model is obtained from step S6. The path is given in the form of a graph structure, where the node represents the area to be cleaned and the edge represents the path connecting different areas. The path planning result not only includes the cleaning order of each node, but also includes the moving path, estimated cleaning time and estimated travel time information between nodes. The path planning result is parsed to generate detailed operation instructions for each cleaning staff, including the cleaning order, cleaning area, moving path and estimated cleaning time. A mobile terminal device based on GPS or other positioning technology is used to provide real-time navigation for the cleaning staff to guide them to move in the garden according to the optimal path. If the environmental conditions (such as the density of tourists or the degree of congestion of the path) change, the system will adjust the path and cleaning plan in real time and update the operation instructions of the cleaning staff. In the actual operation process, the system will continuously monitor the progress of the cleaning staff and environmental changes, such as the actual cleaning time and waste disposal. According to the actual cleaning progress and monitoring data, the cleaning plan is dynamically adjusted to optimize the path selection and cleaning efficiency. For example, if the cleaning time of a certain area exceeds the expected time, the system will recalculate the remaining path and time and adjust the operation instructions. The data from actual operations of the cleaning staff, such as cleaning time and waste disposal volume, will be used as feedback input to update the reinforcement learning model and optimize future path planning and cleaning strategies.
[0065] Please refer to Figure 2 , the present application provides a smart garden management device, including.
[0066] The data collection module, including video surveillance equipment, collects data on visitor activities in various areas of the garden to obtain real-time visitor behavior, garden usage and waste conditions.
[0067] The visitor behavior prediction module combines the construction layout and information of the garden to build a visitor behavior prediction model to predict the density and flow trend of tourists in each area.
[0068] The waste identification module processes the collected monitoring images of each area through image processing and feature recognition technology to identify and classify the type, density and distribution location of waste.
[0069] The waste analysis module combines environmental data to evaluate the estimated processing time for each area and analyze the reasons for waste density and distribution.
[0070] The waste placement point optimization and adjustment module determines the radiation range of waste placement points based on the waste analysis results, adjusts the number of waste placement points and adds new waste placement points based on the utilization efficiency, traffic flow and regional area of existing waste placement points.
[0071] The cleaning path optimization module uses reinforcement learning algorithms to optimize the cleaning paths of cleaning staff based on visitor behavior predictions and waste density assessment results, and prioritizes cleaning during times and routes with fewer tourists to reduce interference with tourists' normal visits.
[0072] The cleaning efficiency evaluation module monitors the execution of cleaning tasks in real time, collects feedback from cleaning staff and tourists, and comprehensively evaluates cleaning efficiency and tourist experience.
[0073] The present application provides a smart garden management system, which includes the following hardware and software components.
[0074] Hardware components include, but are not limited to: servers, which are used to store and process data and run the backend services of the smart garden management system. Data collection equipment, which is used to monitor visitor activities and waste conditions in the garden in real time. Cleaning equipment, including various cleaning tools and garbage collection vehicles, which are used to perform cleaning tasks. Mobile terminals, including tablets and smartphones, are used by managers and cleaners to receive tasks and feedback information in real time.
[0075] Software components include but are not limited to: data processing and analysis software, which is used to process the collected data and perform visitor behavior prediction, waste identification and analysis tasks. User interface, which is an interactive interface provided to managers and visitors, and is used to display the progress of cleaning tasks, visitor density and waste distribution information. Communication module, which is responsible for data transmission and communication between various components of the system.
[0076] The present application provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned smart garden management method.
[0077] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. 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 smart garden management method, characterized in that: The following steps are involved: S1, the data collection module collects image data of visitor activities and waste in various areas of the garden; S2, the visitor behavior prediction module combines the construction layout and information of the garden to establish a visitor behavior prediction model to predict the density and flow trend of tourists in each area; S3, the waste identification module uses image recognition technology to process the monitoring images of each area to identify the type, density and distribution location of waste; S4, the waste analysis module combines environmental data to evaluate the expected processing time of each area and analyze the reasons for waste density and distribution; S5. The waste placement point optimization and adjustment module determines the radiation range of the waste placement points according to the waste analysis results, and adjusts the number of waste placement points and adds new waste placement points according to the utilization efficiency, flow of people and area of the existing waste placement points; S6, the cleaning path optimization module uses reinforcement learning to optimize the cleaning staff's processing path based on visitor flow trend prediction and waste density analysis to reduce interference with tourists; S7, the cleaning efficiency evaluation module monitors the execution of cleaning tasks in real time, and evaluates the cleaning efficiency and visitor experience based on the feedback from cleaning staff and visitors; In step S2, based on the construction layout of the garden, the garden is abstracted into a graph structure G=(V,E), where the node V represents each tourist area in the garden, and the edge E represents the path connecting different areas; the graph structure has node attributes and edge attributes; Node attributes: Each node v i ∈V represents a tourist area, and its attributes include the number of tourists, regional characteristics, and environmental information; Edge attributes: Each edge e ij ∈E represents region v i and v j The attributes of the connected paths between regions include path length and congestion level; path length represents the physical distance or actual walking time between regions, denoted by D ij ; The degree of crowding is calculated based on the tourist flow data on the path; The target detection model YOLO is used to detect tourists from the extracted surveillance video key frames; The model draws rectangular boxes in the image to identify and count tourists. For a certain tourist area v i , its key frame I i t The number of tourists in i t The number of detected rectangular boxes is used to count; the degree of congestion is calculated based on the tourist flow data on the path; the number of path rectangular boxes detected from the key frames of the surveillance video by the target detection model is combined with the path area or width to estimate; for the edge ij The degree of congestion C ij t , expressed by the following formula: C ij t =∑ k∈Pij (N ij t / A ij ); where P ij Indicates path e ij The set of all detection areas, N ij t For path e ij The number of tourists at time t, A ij For path e ij The area or width of the path e ij The index of a single detection region on ; Step S6 includes the following steps: S61. Use graph structure combined with reinforcement learning to optimize the cleaning path. Based on the constructed graph structure G=(V,E), change the node attributes and edge attributes of the graph structure as the state s of reinforcement learning. t ; The node attribute is the waste density M(v i )、Estimated cleaning time T(v i ) and predicted tourist density D(v i ,t); the edge attribute is the path length L(e ij ) and predicted congestion level C(e ij ,t); The reward function is R(s t ,a t ), the design goal is to reduce the impact on tourists and improve cleaning efficiency; action a t It selects the next node based on the current node and chooses a path to move in the graph; S62. Use a graph convolutional network-based reinforcement learning method to learn the optimal path planning strategy, with the goal of maximizing the cumulative reward, π * (s)=argmax π E[∑ t=0 T Q t R(s t ,a t )], where π * (s) is the optimal strategy in state s; argmax π is the indicator function of the maximum value of parameter π; E is the expectation operator, which is used to calculate the expected value of the cumulative reward under strategy π; Q t is the discount factor, where Q∈[0,1]; R(s t ,a t ) is the state s at time step t t and action a t Instant rewards for: In step S2, the spatiotemporal graph convolutional network ST-GCN model is used to predict the visitor flow trend of each tourist area in the garden in the future, the number of tourists in each area and the congestion level of the connecting paths; For the constructed garden graph G = (V, E), its state at different times t is represented by G t =(V t ,E t ) represents, where V t is the set of all nodes at time t; E t is the set of all edges at time t; The changes in the attributes of each node and edge in the time series constitute a spatiotemporal graph sequence input; each node v i t The attribute is represented as a feature vector x i t ;x i t =[N i t ,C i ,E i t ], where N i t is the number of tourists obtained by target detection, C i is the regional characteristic, E i t is the environmental information; each edge e ij t The properties of are expressed as; e ij t =[D ij ,C ij t ], where D ij is the path length, C ij t is the congestion level of the path; The spatiotemporal graph convolutional network ST-GCN model includes spatial convolutional layers and temporal convolutional layers. The spatial convolutional layer extracts spatial features from nodes and neighboring nodes through graph convolution operations. The temporal convolutional layer uses one-dimensional convolution operations to convolve the time series of node features to capture temporal dynamic changes. By stacking multiple layers of spatiotemporal convolutional layers, the model captures the complex spatiotemporal dependencies between nodes and edges. The last layer outputs the predicted values of each node and edge. The loss function is optimized through back-propagation, and the model parameters are gradually adjusted. In step S6, the reward function R(s t ,a t )for: R(s t ,a t )=w1×[-D(v j ,t)-C(e ij ,t)]+w2×[M(v j )+U(v j )]-w3×L(e ij )-w4×[T(v j )+P(e ij )]; where D(v j ,t) is the node v in time period t j The tourist density, C(e ij ,t) is the edge e in time period t ij The degree of crowding; M(v j ) is the node v j The waste density, U(v j ) is the space used for waste placement; L(e ij ) is the path length, T(v j ) is the node v j Estimated cleaning time; P(e ij ) is the edge e ij The estimated travel time; w1, w2, w3 and w4 are coefficients for adjusting the weights of different reward items, which are used to balance the importance of different factors.
2. A smart garden management method according to claim 1, characterized in that: Step S3 comprises the following steps: S31, the semantic segmentation model divides the input image into multiple categories of regions, each category is represented by a block of different color; the semantic segmentation model U-Net is pre-trained using labeled data and fine-tuned for garden scenes to improve its classification effect on specific waste types; S32, using a semantic segmentation model to classify pixels in the image and generate a category segmentation map; each type of waste is segmented into blocks of different colors; by calculating the pixel area of each color block, the quantity and coverage area of different types of waste are obtained; S33, calculating the waste density of each area by counting the waste area of each type; Based on the results of semantic segmentation, a heat map is generated to visualize the distribution density of various types of waste in different areas.
3. The intelligent garden management method according to claim 1, characterized in that: In step S4, a linear regression model is used to establish a relationship between waste density and cleanup time; T i =αD i +β*Attribute i +γ, where T i is the estimated cleaning time of area i, D i is the waste density of region i, Attribute i represents other attributes of region i and node attributes, and α, β, and γ are parameters of the regression model.
4. The intelligent garden management method according to claim 1, characterized in that: In step S4, a semantic segmentation model based on a convolutional neural network is used to extract the part classified as anthropogenic waste and obtain its density and distribution characteristics; Perform spatial distribution analysis on the key frame images of each area and calculate the density D of man-made waste in different areas. i and distribution P i ; Analyze the distribution of man-made waste at different distances from the waste placement point, and calculate the density of man-made waste as a function of distance d from the waste placement point j. i,j changes in Analyze the impact of space usage of waste disposal points on waste density, and calculate the waste density based on the used space C of the waste disposal point. j used and the remaining space C j remaining , analyze the waste density D i The impact of Analyze the impact of the number of tourists on the density and distribution of waste, and analyze the number of tourists L in area i i and anthropogenic waste density D i relationship.
5. A smart garden management method according to claim 4, characterized in that: Step S5 includes the following steps: S51. Calculate the radiation range of the waste placement point, and use the analysis results to calculate the radiation range R of each waste placement point j. j , R j =argmax{d i,j ∣ D ij ≤τ}, where τ is the set waste density threshold, which is used to determine the effective service radius of the delivery point; argmax is the indicator function of the maximum value of the parameter; S52. Calculate the utilization efficiency E of existing waste disposal points j , E j =U j / C j , where U j is the used capacity of delivery point j, C j is the total capacity of the delivery point; S51. Calculate the number of waste disposal points required by the flow of people and the area. For a specific area i, the number of waste disposal points required is M i The calculation formula is: M i =(U i ×A i ) / (C avg ×R avg ), where U i is the average flow of people in area i; A i is the area of region i; C avg is the average capacity of the delivery point; R avg is the average radiation range area of the placement point; S54. Optimize and add new waste disposal points. For those with high utilization efficiency, consider adding more disposal points or expanding the capacity of existing disposal points. For those with low utilization efficiency, consider relocating or removing them and reallocating them to other more efficient areas. In areas with high traffic volume and large area but insufficient radiation range of existing disposal points, according to the calculated demand M i Add new waste disposal points.
6. A smart garden management device using the smart garden management method according to any one of claims 1 to 5, comprising a data acquisition module, a visitor behavior prediction module, a waste identification module, a waste analysis module, a delivery point optimization adjustment module, a cleaning path optimization module and a cleaning efficiency evaluation module; characterized in that: The data collection module includes video surveillance equipment to collect data on visitor activities in various areas of the garden, obtaining real-time visitor behavior, garden usage, and waste conditions; The visitor behavior prediction module combines the construction layout and information of the garden to build a visitor behavior prediction model to predict the density and flow trend of tourists in each area; The waste identification module processes the collected monitoring images of each area through image processing and feature recognition technology to identify and classify the type, density and distribution location of waste; The waste analysis module combines environmental data to assess the estimated processing time for each area and analyze the causes of waste density and distribution; The waste placement point optimization and adjustment module determines the radiation range of waste placement points based on the waste analysis results; adjusts the number of waste placement points and adds new waste placement points based on the utilization efficiency, traffic flow and area of existing waste placement points; The cleaning path optimization module uses reinforcement learning algorithms to optimize the cleaning paths of cleaning personnel based on visitor behavior predictions and waste density assessment results; The cleaning efficiency evaluation module monitors the execution of cleaning tasks in real time, collects feedback from cleaning staff and tourists, and comprehensively evaluates cleaning efficiency and tourist experience.
7. A smart garden management system using the smart garden management method according to any one of claims 1 to 6, characterized in that: Includes the following hardware and software components: Hardware components include but are not limited to: Server, used to store and process data and run the backend services of the smart garden management system; Data collection equipment to monitor visitor activities and waste conditions in the garden in real time; Cleaning equipment, including various cleaning tools and garbage collection vehicles, used to perform cleanup tasks; Mobile terminals, including tablets and smartphones, for managers and cleanup crews to receive tasks and feedback in real time; Software components include but are not limited to: Data processing and analysis software, used to process the collected data and perform visitor behavior prediction, waste identification and analysis tasks; User interface, an interactive interface provided to managers and tourists to display the progress of cleaning tasks, tourist density and waste distribution information; The communication module is responsible for data transmission between system components.
8. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the intelligent garden management method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Smart garden management method, device and system and storage medium
CN117035217A
Atmospheric pollutant prediction method and system based on deep learning model
CN113496310A
Collection and transportation vehicle scheduling method and system based on municipal solid waste classification
CN114330874A