CN120547199A - Public toilet environment management method, device, electronic equipment and medium based on the Internet of Things - Google Patents

Public toilet environment management method, device, electronic equipment and medium based on the Internet of Things

Info

Publication number
CN120547199A
CN120547199A CN202510661741.2A CN202510661741A CN120547199A CN 120547199 A CN120547199 A CN 120547199A CN 202510661741 A CN202510661741 A CN 202510661741A CN 120547199 A CN120547199 A CN 120547199A
Authority
CN
China
Prior art keywords
data
public toilet
buffer
threshold
protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202510661741.2A
Other languages
Chinese (zh)
Other versions
CN120547199B (en
Inventor
李宝烁
马锡铭
李再博
李成宽
刘恒磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhonghuanjie Beijing Environmental Technology Co ltd
Original Assignee
Zhonghuanjie Beijing Environmental Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhonghuanjie Beijing Environmental Technology Co ltd filed Critical Zhonghuanjie Beijing Environmental Technology Co ltd
Priority to CN202510661741.2A priority Critical patent/CN120547199B/en
Priority claimed from CN202510661741.2A external-priority patent/CN120547199B/en
Publication of CN120547199A publication Critical patent/CN120547199A/en
Application granted granted Critical
Publication of CN120547199B publication Critical patent/CN120547199B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9021Plurality of buffers per packet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Alarm Systems (AREA)

Abstract

本申请提供一种基于物联网的公厕环境管理方法、装置、电子设备及介质,该方法包括按照配置的时间间隔,获取目标公厕中不同传感器采集的公厕数据;将各公厕数据存储至对应的设备缓冲区;对各设备缓冲区中的公厕数据进行分类处理,得到不同协议类型的公厕数据,对各公厕数据进行排序处理,得到该协议缓冲区对应的第一数据序列;若不同传感器采集的公厕数据均未超出相应的数据阈值,则基于全局缓冲区中的第一数据序列,确定目标公厕的环境质量指数,并在环境质量指数超出配置的环境质量指数阈值时,根据环境质量指数对目标公厕的配置的换气设备进行调节。本申请能够显著提高公厕的管理水平和效率,还能为用户提供更加舒适便捷的服务体验。

The present application provides a public toilet environment management method, device, electronic device, and medium based on the Internet of Things. The method includes obtaining public toilet data collected by different sensors in a target public toilet at configured time intervals; storing each public toilet data in a corresponding device buffer; classifying the public toilet data in each device buffer to obtain public toilet data of different protocol types; sorting each public toilet data to obtain a first data sequence corresponding to the protocol buffer; if the public toilet data collected by different sensors do not exceed the corresponding data threshold, then determining the environmental quality index of the target public toilet based on the first data sequence in the global buffer, and when the environmental quality index exceeds the configured environmental quality index threshold, adjusting the ventilation equipment configured in the target public toilet according to the environmental quality index. The present application can significantly improve the management level and efficiency of public toilets, and can also provide users with a more comfortable and convenient service experience.

Description

Public toilet environment management method and device based on Internet of things, electronic equipment and medium
Technical Field
The application relates to the field of public toilet management, in particular to a public toilet environment management method, device, electronic equipment and medium based on the Internet of things.
Background
As the progress of urbanization accelerates and the demand of public facilities increases, public toilets are an important component of urban infrastructure, and the management efficiency and the quality of service thereof are directly related to the quality of life of citizens and the image of cities. The traditional public toilet management mode mainly depends on manual inspection and periodic maintenance, and the mode has the problems of untimely response, resource waste and the like.
Disclosure of Invention
The embodiment of the application aims to provide a public toilet environment management method, device, electronic equipment and medium based on the Internet of things, which are used for solving the problems in the prior art, remarkably improving the management level and efficiency of public toilets and providing more comfortable and convenient service experience for users.
In a first aspect, a public toilet environment management method based on internet of things is provided, and the public toilet environment management method is applied to a data monitoring system, wherein the system comprises a data buffer platform, a data buffer platform and a data buffer system, wherein the data buffer platform comprises a device buffer area corresponding to each sensor, a plurality of protocol buffer areas and a global buffer area, the protocol buffer areas are grouped according to protocol types, and the method comprises the following steps:
according to the configured time interval, public toilet data acquired by different sensors in the target public toilet are acquired;
storing the public toilet data into corresponding equipment buffer areas;
classifying public toilet data in each equipment buffer area to obtain public toilet data of different protocol types, and storing the public toilet data of the same class in the corresponding protocol buffer area;
Sequencing all public toilet data in any protocol buffer area to obtain a first data sequence corresponding to the protocol buffer area, and storing the first data sequence into the global buffer area;
If the public toilet data collected by different sensors do not exceed the corresponding data threshold, determining the environmental quality index of the target public toilet based on the first data sequence in the global buffer zone, and adjusting the configured ventilation equipment of the target public toilet according to the environmental quality index when the environmental quality index exceeds the configured environmental quality index threshold.
In one possible implementation, the sorting processing is performed on each public toilet data in the protocol buffer area to obtain a first data sequence corresponding to the protocol buffer area, including:
Calculating a time dimension factor, a space dimension factor and an environment dimension factor corresponding to public toilet data aiming at any public toilet data to obtain a target weight of the public toilet data;
And sequencing the public toilet data based on the target weight of the public toilet data to obtain a first data sequence consisting of a plurality of public toilet data.
In one possible implementation, obtaining the target weight of the public toilet data includes:
Calculating a time dimension factor, a space dimension factor and an environment dimension factor corresponding to the public toilet data by adopting a configured weight algorithm to obtain a target weight of the public toilet data;
The weight algorithm is as follows:
Wherein W total is a target weight, W time is a time dimension factor, W space is a space dimension factor, and W env is an environment dimension factor.
In one possible implementation, after storing the first data sequence in the global buffer, the method further includes:
if any public toilet data exceeds the corresponding data threshold value, determining alarm starting time based on the acquisition time of the public toilet data, and generating an alarm prompt of the corresponding public toilet data;
Calculating a target difference value between the public toilet data and the data threshold value;
based on the corresponding relation between the configured different difference values and different adjusting parameters, determining the adjusting parameters corresponding to the target difference values, and adjusting the ventilation equipment corresponding to the public toilet data through the adjusting parameters;
And when the public toilet data does not exceed the corresponding data threshold value, determining the alarm ending time based on the collection time of the public toilet data, and ending the alarm prompt.
In one possible implementation, after determining the alarm start time and the alarm end time, the method further includes:
determining an alarm period based on the alarm start time and the alarm end time;
counting all corresponding public toilet data in the alarm period to obtain a second data sequence of each public toilet data which changes with time;
And determining new adjusting parameters based on the change trend of each public toilet data in the second data sequence.
In one possible implementation, the public toilet data includes gas data, temperature and humidity data, and people flow data.
In one possible implementation, the determining manner of the data threshold corresponding to the gas data includes:
Calculating the configured basic value and the people flow rate of the time interval based on a configured threshold algorithm, and determining a data threshold corresponding to the gas data;
The threshold algorithm is as follows:
w=β01×(1-e-λQ)
Wherein W is the data threshold, β 0 is the base threshold, Q is the human traffic, β 1 is the delta of the human traffic to the data threshold, and λ is the rate at which the control data threshold increases with the human traffic.
In a second aspect, a public toilet environment management device based on internet of things is provided, and the public toilet environment management device is applied to a data monitoring system, wherein the system comprises a data buffer platform, a data buffer platform and a data buffer system, wherein the data buffer platform comprises a device buffer area corresponding to each sensor, a plurality of protocol buffer areas and a global buffer area, the protocol buffer areas are grouped according to protocol types, and the public toilet environment management device can comprise:
The acquisition unit is used for acquiring public toilet data acquired by different sensors in the target public toilet according to the configured time interval;
the processing unit is used for storing the public toilet data into the corresponding equipment buffer area;
Classifying the public toilet data in each equipment buffer area to obtain public toilet data of different protocol types, and storing the public toilet data of the same class in the corresponding protocol buffer area;
The sequencing unit is used for sequencing all public toilet data in any protocol buffer zone to obtain a first data sequence corresponding to the protocol buffer zone, and storing the first data sequence into the global buffer zone;
The processing unit is used for determining the environmental quality index of the target public toilet based on the first data sequence in the global buffer zone if the public toilet data acquired by different sensors do not exceed the corresponding data threshold, and adjusting the configured ventilation equipment of the target public toilet according to the environmental quality index when the environmental quality index exceeds the configured environmental quality index threshold.
In a third aspect, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory are in communication with each other via the communication bus;
a memory for storing a computer program;
A processor for implementing the method steps of any one of the above first aspects when executing a program stored on a memory.
In a fourth aspect, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the method steps of any of the first aspects.
The application provides a public toilet environment management method based on the Internet of things, which comprises the steps of acquiring public toilet data acquired by different sensors in a target public toilet according to configured time intervals, storing the public toilet data in corresponding equipment buffer areas, classifying the public toilet data in the equipment buffer areas to obtain public toilet data of different protocol types, storing the public toilet data of the same type in the corresponding protocol buffer areas, sequencing the public toilet data in the protocol buffer areas aiming at any protocol buffer area to obtain a first data sequence corresponding to the protocol buffer area, storing the first data sequence in a global buffer area, determining the environmental quality index of the target public toilet based on the first data sequence in the global buffer area if the public toilet data acquired by different sensors does not exceed corresponding data threshold values, and adjusting configured ventilation equipment of the target public toilet according to the environmental quality index when the environmental quality index exceeds the configured environmental quality index threshold value. The public toilet data storage mode adopts mongdb and other big data databases for storage, and avoids performance bottleneck caused by one-time traditional database inquiry. And a time window sliding mechanism for dynamically adjusting the time window when the timer is triggered, so as to ensure that the query range always covers the latest time interval. And (3) alarm state management, namely, equipment alarm state caching and fitting are designed, so that frequent read-write operation on a database is reduced. The public toilet data collected by each sensor maintains independent states (including whether an alarm is given, the starting time of the alarm and the like). And dynamically updating the abnormal value, dynamically updating the maximum value under the alarm state by using the variable, and reducing repeated calculation.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a system architecture diagram applied to a public toilet environment management method based on the internet of things, provided by an embodiment of the application;
Fig. 2 is a schematic flow chart of a public toilet environment management method based on the internet of things according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a public toilet environment management device based on the internet of things according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The public toilet environment management method based on the Internet of things can be applied to the system architecture shown in fig. 1, and the system can comprise a data monitoring system and a server as shown in fig. 1. The server may be a physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content delivery network (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligent platform. The Terminal may be a Mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet personal computer (PAD), or other User Equipment (UE), a handheld device, a car-mounted device, a wearable device, a computing device, or other processing device connected to a wireless modem, a Mobile Station (MS), a Mobile Terminal (Mobile Terminal), or the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
The data monitoring system is used for acquiring public toilet data acquired by different sensors in a target public toilet, and specifically comprises a data buffer platform, wherein the data buffer platform comprises a device buffer area corresponding to each sensor, a plurality of protocol buffer areas and a global buffer area, and the protocol buffer areas are grouped according to protocol types.
In order to make the data monitoring system more flexible and expandable, a five-layer plug-in architecture is adopted:
And the core framework layer provides basic services and plug-in management.
And the protocol adaptation layer supports dynamic loading of multiple protocols.
And the data processing layer is responsible for message routing and service logic processing.
And the storage access layer is used for uniformly managing the data storage interfaces.
And the management interface layer is used for providing a visual plug-in management and monitoring interface.
Plug-in discovery:
and (3) scanning the file system, namely periodically checking plug-in packages under the specified directory.
Service registry-available plug-in information is obtained from the registry.
Remote plug-in warehouse: and obtaining a plug-in list through a network.
Plug-in loading:
and the custom class loader is used for realizing the isolation loading of the plug-in class.
And the dependency analysis is to automatically analyze and load plug-in dependency.
Secure verification, verifying the plug-in signature and integrity.
Plug-in initialization:
Configuration injection, namely obtaining plug-in configuration from a configuration center.
Service registration, namely registering the plug-in service to the core framework.
And (3) resource allocation, namely allocating necessary system resources for the plug-in.
Plug-in unloading:
service cancellation, namely canceling plug-in service from the core framework.
And releasing the resources, namely releasing the system resources occupied by the plug-in.
The class loader destroys the class loader of the destroying plug-in.
Inter-plug-in communication mechanism:
event bus: event communication based on publish-subscribe mode.
Service discovery the plug-in can discover and invoke services provided by other plug-ins.
And data sharing, namely realizing data exchange among the plug-ins through a shared memory and a cache.
Asynchronous message-message queue implements asynchronous communication between the plugins.
The protocol driven dynamic loading flow may be:
1. and in the plug-in scanning stage, WATCHSERVICE (JAVA) or inotify (Linux) is adopted to monitor the change of the plug-in catalogue in real time, so that delay is reduced by replacing timing scanning.
The plugin. Json, key field example, was parsed using Jackson/Gson.
It is determined whether the versions are compatible, e.g., the master version numbers must be identical, by semantically versioning (SemVer).
2. Class loading stage:
A separate URLClassLoader load plug-in class is created.
And realizing the custom processing of the parent delegation model.
And the MAVEN SHADE plug-in is adopted to redirect the dependent packet path, so that the conflict with the host environment is avoided.
3. Instantiation stage:
reflection instantiation enhancement, with the structure of the tape parameters supported by the constructor.newInstance () instead of the class.newInstance ().
Depending on the injection implementation, guice lightweight DI containers are used.
4. Registration:
thread-safe driver registration is implemented using CopyOnWriteArrayList.
Registering to Consul/Zookeeper realizes cluster perception.
5. Heat offloading mechanism:
runtime driven replacement is implemented using dynamic agents.
The connection pool switches smoothly.
And realizing the uninterrupted service upgrade.
The JVM unloading process is observed through-XX: + TraceClassUnloading, and it is ensured that no static reference residues and background tasks such as thread pools are terminated.
In some embodiments, the performance of the system is optimized, parallel loading is accelerated, and the parallel initialization of the plug-ins can be realized by using CompletableFuture, and buffer optimization can be realized by adopting Caffeine to buffer loaded plug-in metadata, and TTL is set to prevent memory leakage.
With the rapid development of urbanization and the increasing demand for public facilities, public toilets are used as key parts of urban infrastructure, and the management efficiency and the service level of the public toilets directly influence the life quality of citizens and the overall image of cities. Traditionally, public toilets are managed mainly by means of manual inspection and maintenance in a preset period, and the method is slow in response, cannot respond quickly when facing problems, and often causes improper resource utilization and waste. This approach is difficult to meet the public utility management requirements of modern cities for high efficiency, environmental protection and user friendliness.
Therefore, an object of the embodiment of the present application is to provide a public toilet environment management method based on the internet of things, which is used for solving the above problems existing in the prior art, significantly improving the management level and efficiency of public toilets, and providing more comfortable and convenient service experience for users.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are for illustration and explanation only, and not for limitation of the present application, and embodiments of the present application and features of the embodiments may be combined with each other without conflict.
Fig. 2 is a schematic flow chart of a public toilet environment management method based on the internet of things according to an embodiment of the present application. As shown in fig. 2, the method may include:
step S210, according to the configured time interval, public toilet data acquired by different sensors in the target public toilet are acquired.
Specifically, a plurality of monitored public toilets are provided with a gas sensor, a temperature and humidity sensor and a human flow sensor;
And sending the public toilet data acquired in the corresponding time interval to a data monitoring system by each sensor according to the configured time interval.
Because the data buffer platform in the data monitoring system comprises the equipment buffer areas corresponding to the sensors, REDIS PIPELINE is used for writing the public toilet data into the equipment level buffer areas in batches, and network overhead is reduced.
And the equipment-level buffer area is provided with an independent buffer area of each sensor for storing public toilet data uploaded by the sensor. These public toilet data are typically raw data that are not classified.
In some embodiments, the size of the buffer area of the corresponding device is adjusted according to the rate at which the sensors collect public toilet data, for example, a memory management library (e.g., jemalloc) is used to monitor the buffer area usage in real time, and when the usage exceeds a threshold (e.g., 80%), the buffer area is automatically expanded. The initial equipment buffer area is 1MB, and the data is expanded to 5MB when in surge, so that overflow is avoided.
In some embodiments, the device level buffer adopts an LRU (least recently used) elimination strategy to protect key public toilet data, the device level buffer is divided into a plurality of sub queues, the elimination sequence is managed according to priority, the P0 area (fixed reservation) stores alarm data, the capacity is fixed (such as 10 pieces), the alarm data are manually cleared, the P1 area (weighted LRU) has high weight data, the elimination probability=standard LRU probability multiplied by 0.3, the P2 area (standard LRU) basic elimination strategy, the P3 area (aggressive LRU) elimination probability=standard LRU probability multiplied by 1.5, when the space of the device buffer is insufficient, the elimination score is calculated according to priority and access time, and the elimination score=priority weight current time-last access time is used for eliminating the corresponding public toilet data based on the elimination score.
Step S220, classifying the public toilet data in the equipment buffer areas to obtain public toilet data of different protocol types, and storing the public toilet data of the same class in the corresponding protocol buffer areas.
Specifically, for public toilet data in any equipment buffer area, parsing is performed according to a protocol format used by the public toilet data:
And determining a transmission protocol of the public toilet data, and classifying the public toilet data according to the type of the transmission protocol (such as MQTT, HTTP, coAP). For example, a class tag may be created for each protocol and the same type of public toilet data may be categorized into one class, thereby storing the same class of public toilet data in a corresponding protocol buffer.
In some embodiments, for any protocol buffer, the public toilet data is divided into hot data (current time interval), warm data (historical time relatively close to the current time interval) and cold data (historical time relatively far from the current time interval) according to the collection time or importance of the public toilet data, and the sub-protocol buffers are respectively stored in different performance levels. Therefore, the data processing efficiency with high performance requirements can be ensured, and the storage cost can be reduced.
Step S230, aiming at any protocol buffer, sequencing all public toilet data in the protocol buffer to obtain a first data sequence corresponding to the protocol buffer, and storing the first data sequence into a global buffer.
Specifically, for any public toilet data, calculating a time dimension factor, a space dimension factor and an environment dimension factor corresponding to the public toilet data by adopting a configured weight algorithm to obtain a target weight of the public toilet data;
the weighting algorithm can be expressed as:
Wherein W total is a target weight, W time is a time dimension factor, W space is a space dimension factor, and W env is an environment dimension factor.
And sequencing the public toilet data based on the sequence of the target weights of the public toilet data from large to small to obtain a first data sequence consisting of a plurality of public toilet data.
Further, the global buffer uses REDIS STREAM consumer groups to achieve load balancing. In some embodiments, the MaxLen parameter of REDIS STREAM is used to control the maximum number of messages.
Step S240, the first data sequence in the global buffer area is processed to obtain adjustment parameters, and ventilation equipment corresponding to public toilet data is adjusted through the adjustment parameters.
After storing the first data sequence in the global buffer, the method further comprises:
A. If any public toilet data exceeds the corresponding data threshold, determining alarm starting time based on the collection time of the public toilet data, and generating an alarm prompt of the corresponding public toilet data, wherein in some embodiments, the public toilet data comprises gas data, temperature and humidity data and people flow data. When the public toilet data is gas data, the data threshold determining process comprises the steps of calculating the configured basic value and the people flow at time intervals based on a configured threshold algorithm, and determining the data threshold corresponding to the gas data, wherein the threshold algorithm is as follows:
w=β01×(1-e-λQ)
Wherein W is the data threshold, β 0 is the base threshold, Q is the human traffic, β 1 is the delta of the human traffic to the data threshold, and λ is the rate at which the control data threshold increases with the human traffic.
In another embodiment, for example, the data threshold for calculating the temperature and humidity data is that a basic threshold corresponding to the temperature and humidity data in the threshold algorithm is different from the data threshold corresponding to the gas data.
Calculating a target difference value between public toilet data and a data threshold value;
Based on the corresponding relation between the different configured differences and different adjusting parameters, the adjusting parameters corresponding to the target differences are determined, and the ventilation equipment corresponding to the public toilet data is adjusted through the adjusting parameters.
When the public toilet data does not exceed the corresponding data threshold value at a certain time point after the public toilet data changes along with time, determining alarm ending time based on the collection time of the public toilet data, and ending an alarm prompt.
After determining the alarm start time and the alarm end time, the method further comprises:
The method comprises the steps of determining an alarm time period based on the alarm starting time and the alarm ending time, specifically, automatically recording the alarm starting time when the data threshold value is exceeded for the first time, recording the alarm ending time when public toilet data is recovered to be normal (lower than the data threshold value), and automatically generating a complete alarm time period. It can be understood that if the public toilet data is not currently in the alarm state (is exceeded for the first time), the collection time of the public toilet data is set as the alarm starting time StartTime. The alarm state is initialized to yes. The current index value is recorded as a maximum value MaxValue in unit MaxUnit. If the current public toilet data is in an alarm state, comparing the current public toilet data with MaxValue, and updating the maximum value and the unit. If the value of the public toilet data is lower than or equal to the Threshold value of the data, if the equipment is in an alarm state, setting the acquisition time of the current public toilet data as the alarm ending time EndTime. The alarm event is recorded, including sensor ID, alarm time period, maximum value and unit thereof. The alarm state is reset to no.
Counting all corresponding public toilet data in the alarm period to obtain a second data sequence of each public toilet data which changes with time; in some embodiments, the largest public toilet data in the second data sequence is counted to determine the severity of the environmental anomaly.
And determining new adjusting parameters based on the change trend of the public toilet data in the second data sequence.
B. If a plurality of public toilet data (different gas data or gas data and temperature and humidity data) exceeds the corresponding data threshold, determining a final parameter Ptotal: ptotal=w1P Δ1+w2PΔ2;
Wherein w1 and w2 are respectively a first gas weight and a second gas weight or a gas weight and a temperature and humidity weight, and P Δ1 and P Δ2 are respectively a first gas data and a second gas data or a gas data and a temperature and humidity data.
According to the corresponding relation between different parameters and different adjusting parameters, the adjusting parameters corresponding to the final parameters are determined, and the ventilation equipment corresponding to the public toilet data is adjusted based on the adjusting parameters.
C. If the public toilet data collected by different sensors do not exceed the corresponding data threshold, determining the environmental quality index of the target public toilet based on the first data sequence in the global buffer zone, and adjusting the configured ventilation equipment of the target public toilet according to the environmental quality index EQI when the environmental quality index exceeds the configured environmental quality index threshold.
Specifically, eqi= (w1data1+w2data2+) + wnDatam)/(w1+w2+) +wn, where wi is the weight of the i-th sensor Data and Datai is the i-th public toilet Data in the first Data sequence.
After that, depending on the configured different levels of EQI thresholds, for example green area (excellent), yellow area (good), orange area (attention), red area (dangerous).
When the EQI is in the green area, the working state of the current ventilation equipment is kept unchanged.
When the EQI enters the yellow zone, the operating frequency of the ventilator is increased.
If the EQI reaches the orange region, ventilation efficiency should be significantly improved, and multiple ventilators may need to be activated simultaneously.
In the event that the EQI enters the red zone, the system immediately takes the strongest ventilation action and notifies maintenance personnel to check and process.
The application provides a public toilet environment management method based on the Internet of things, which comprises the steps of acquiring public toilet data acquired by different sensors in a target public toilet according to configured time intervals, storing the public toilet data in corresponding equipment buffer areas, classifying the public toilet data in the equipment buffer areas to obtain public toilet data of different protocol types, storing the public toilet data of the same type in the corresponding protocol buffer areas, sequencing the public toilet data in the protocol buffer areas aiming at any protocol buffer area to obtain a first data sequence corresponding to the protocol buffer area, storing the first data sequence in a global buffer area, determining the environmental quality index of the target public toilet based on the first data sequence in the global buffer area if the public toilet data acquired by different sensors does not exceed corresponding data threshold values, and adjusting configured ventilation equipment of the target public toilet according to the environmental quality index when the environmental quality index exceeds the configured environmental quality index threshold value. The public toilet data storage mode adopts mongdb and other big data databases for storage, and avoids performance bottleneck caused by one-time traditional database inquiry. And a time window sliding mechanism for dynamically adjusting the time window when the timer is triggered, so as to ensure that the query range always covers the latest time interval. And (3) alarm state management, namely, equipment alarm state caching and fitting are designed, so that frequent read-write operation on a database is reduced. The public toilet data collected by each sensor maintains independent states (including whether an alarm is given, the starting time of the alarm and the like). And dynamically updating the abnormal value, dynamically updating the maximum value under the alarm state by using the variable, and reducing repeated calculation.
Corresponding to the method, the embodiment of the application also provides a public toilet environment management device based on the Internet of things, which is applied to a data monitoring system as shown in fig. 3, wherein the system comprises a data buffer platform, a data processing platform and a data processing device, wherein the data buffer platform comprises a device buffer area corresponding to each sensor, a plurality of protocol buffer areas and a global buffer area, the protocol buffer areas are grouped according to protocol types, and the device comprises:
An obtaining unit 310, configured to obtain public toilet data collected by different sensors in the target public toilet according to a configured time interval;
a processing unit 320, configured to store each public toilet data to a corresponding device buffer;
Classifying the public toilet data in each equipment buffer area to obtain public toilet data of different protocol types, and storing the public toilet data of the same class in the corresponding protocol buffer area;
The ordering unit 330 is configured to perform ordering processing on each public toilet data in any protocol buffer to obtain a first data sequence corresponding to the protocol buffer, and store the first data sequence into the global buffer;
The processing unit 320 is configured to determine an environmental quality index of the target public toilet based on the first data sequence in the global buffer if the public toilet data collected by different sensors do not exceed the corresponding data threshold, and adjust the configured ventilation device of the target public toilet according to the environmental quality index when the environmental quality index exceeds the configured environmental quality index threshold.
The functions of each functional unit of the public toilet environment management device based on the internet of things provided by the embodiment of the application can be realized through the steps of the method, so that the specific working process and the beneficial effects of each unit in the public toilet environment management device based on the internet of things provided by the embodiment of the application are not repeated herein.
The embodiment of the present application further provides an electronic device, as shown in fig. 4, including a processor 410, a communication interface 420, a memory 430, and a communication bus 440, where the processor 410, the communication interface 420, and the memory 430 complete communication with each other through the communication bus 440.
A memory 430 for storing a computer program;
the processor 410 is configured to execute the program stored in the memory 430, and implement the following steps:
according to the configured time interval, public toilet data acquired by different sensors in the target public toilet are acquired;
storing the public toilet data into corresponding equipment buffer areas;
classifying public toilet data in each equipment buffer area to obtain public toilet data of different protocol types, and storing the public toilet data of the same class in the corresponding protocol buffer area;
Sequencing all public toilet data in any protocol buffer area to obtain a first data sequence corresponding to the protocol buffer area, and storing the first data sequence into the global buffer area;
If the public toilet data collected by different sensors do not exceed the corresponding data threshold, determining the environmental quality index of the target public toilet based on the first data sequence in the global buffer zone, and adjusting the configured ventilation equipment of the target public toilet according to the environmental quality index when the environmental quality index exceeds the configured environmental quality index threshold.
The communication bus mentioned above may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor including a central Processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc., or may be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application Specific Integrated Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
Since the implementation manner and the beneficial effects of the solution to the problem of each device of the electronic apparatus in the foregoing embodiment may be implemented by referring to each step in the embodiment shown in fig. 2, the specific working process and the beneficial effects of the electronic apparatus provided by the embodiment of the present application are not repeated herein.
In still another embodiment of the present application, a computer readable storage medium is provided, where instructions are stored, when the computer readable storage medium runs on a computer, to cause the computer to execute the public toilet environment management method based on the internet of things according to any one of the foregoing embodiments.
In yet another embodiment of the present application, a computer program product containing instructions that, when executed on a computer, cause the computer to perform a public toilet environment management method based on the internet of things as in any one of the above embodiments is also provided.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. The terms "first," "second," and the like, as used herein, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected," "coupled," or "connected," and the like, are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, the present embodiments are intended to be construed as including the preferred embodiments and all such alterations and modifications that fall within the scope of the embodiments.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present application without departing from the spirit or scope of the embodiments of the application. Thus, if such modifications and variations of the embodiments in the present application fall within the scope of the embodiments of the present application and the equivalent techniques thereof, such modifications and variations are also intended to be included in the embodiments of the present application.

Claims (10)

1. The public toilet environment management method based on the Internet of things is characterized by being applied to a data monitoring system, and the system comprises a data buffer platform, a data processing platform and a data processing platform, wherein the data buffer platform comprises a device buffer zone corresponding to each sensor, a plurality of protocol buffer zones and a global buffer zone, wherein the protocol buffer zones are grouped according to protocol types, and the method comprises the following steps:
according to the configured time interval, public toilet data acquired by different sensors in the target public toilet are acquired;
storing the public toilet data into corresponding equipment buffer areas;
classifying public toilet data in each equipment buffer area to obtain public toilet data of different protocol types, and storing the public toilet data of the same class in the corresponding protocol buffer area;
Sequencing all public toilet data in any protocol buffer area to obtain a first data sequence corresponding to the protocol buffer area, and storing the first data sequence into the global buffer area;
If the public toilet data collected by different sensors do not exceed the corresponding data threshold, determining the environmental quality index of the target public toilet based on the first data sequence in the global buffer zone, and adjusting the configured ventilation equipment of the target public toilet according to the environmental quality index when the environmental quality index exceeds the configured environmental quality index threshold.
2. The method of claim 1, wherein the step of ordering the public toilet data in the protocol buffer to obtain the first data sequence corresponding to the protocol buffer comprises:
Calculating a time dimension factor, a space dimension factor and an environment dimension factor corresponding to public toilet data aiming at any public toilet data to obtain a target weight of the public toilet data;
And sequencing the public toilet data based on the target weight of the public toilet data to obtain a first data sequence consisting of a plurality of public toilet data.
3. The method of claim 2, wherein obtaining the target weight for the public toilet data comprises:
Calculating a time dimension factor, a space dimension factor and an environment dimension factor corresponding to the public toilet data by adopting a configured weight algorithm to obtain a target weight of the public toilet data;
The weight algorithm is as follows:
Wherein W total is a target weight, W time is a time dimension factor, W space is a space dimension factor, and W env is an environment dimension factor.
4. The method of claim 1, wherein after storing the first data sequence in the global buffer, the method further comprises:
if any public toilet data exceeds the corresponding data threshold value, determining alarm starting time based on the acquisition time of the public toilet data, and generating an alarm prompt of the corresponding public toilet data;
Calculating a target difference value between the public toilet data and the data threshold value;
based on the corresponding relation between the configured different difference values and different adjusting parameters, determining the adjusting parameters corresponding to the target difference values, and adjusting the ventilation equipment corresponding to the public toilet data through the adjusting parameters;
And when the public toilet data does not exceed the corresponding data threshold value, determining the alarm ending time based on the collection time of the public toilet data, and ending the alarm prompt.
5. The method of claim 4, wherein after determining the alarm start time and the alarm end time, the method further comprises:
determining an alarm period based on the alarm start time and the alarm end time;
counting all corresponding public toilet data in the alarm period to obtain a second data sequence of each public toilet data which changes with time;
And determining new adjusting parameters based on the change trend of each public toilet data in the second data sequence.
6. The method of claim 4, wherein the public toilet data includes gas data, temperature and humidity data, and people flow data.
7. The method of claim 6, wherein the determining the data threshold for the gas data comprises:
Calculating the configured basic value and the people flow rate of the time interval based on a configured threshold algorithm, and determining a data threshold corresponding to the gas data;
The threshold algorithm is as follows:
w=β01×(1-e-λQ)
Wherein W is the data threshold, β 0 is the base threshold, Q is the human traffic, β 1 is the delta of the human traffic to the data threshold, and λ is the rate at which the control data threshold increases with the human traffic.
8. The public toilet environment management device based on the Internet of things is characterized by being applied to a data monitoring system, and the system comprises a data buffer platform, a data processing platform and a data processing platform, wherein the data buffer platform comprises a device buffer zone corresponding to each sensor, a plurality of protocol buffer zones and a global buffer zone, wherein the protocol buffer zones are grouped according to protocol types, and the device comprises:
The acquisition unit is used for acquiring public toilet data acquired by different sensors in the target public toilet according to the configured time interval;
the processing unit is used for storing the public toilet data into the corresponding equipment buffer area;
Classifying the public toilet data in each equipment buffer area to obtain public toilet data of different protocol types, and storing the public toilet data of the same class in the corresponding protocol buffer area;
The sequencing unit is used for sequencing all public toilet data in any protocol buffer zone to obtain a first data sequence corresponding to the protocol buffer zone, and storing the first data sequence into the global buffer zone;
The processing unit is used for determining the environmental quality index of the target public toilet based on the first data sequence in the global buffer zone if the public toilet data acquired by different sensors do not exceed the corresponding data threshold, and adjusting the configured ventilation equipment of the target public toilet according to the environmental quality index when the environmental quality index exceeds the configured environmental quality index threshold.
9. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are in communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-7 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-7.
CN202510661741.2A 2025-05-22 Public toilet environment management method and device based on Internet of things, electronic equipment and medium Active CN120547199B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510661741.2A CN120547199B (en) 2025-05-22 Public toilet environment management method and device based on Internet of things, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510661741.2A CN120547199B (en) 2025-05-22 Public toilet environment management method and device based on Internet of things, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN120547199A true CN120547199A (en) 2025-08-26
CN120547199B CN120547199B (en) 2026-01-23

Family

ID=

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090119142A1 (en) * 2007-11-05 2009-05-07 Sloan Valve Company Restroom convenience center
CN109919482A (en) * 2019-03-04 2019-06-21 元博科技(香港)有限公司 An intelligent public toilet cleaning management system and method
CN112785818A (en) * 2020-12-29 2021-05-11 武汉飞恩微电子有限公司 Method, device and sensor system for environmental detection of a vehicle
CN114979213A (en) * 2022-05-24 2022-08-30 新环(厦门)环境工程有限公司 Public toilet management system and method with deodorizer as control center
WO2023150841A1 (en) * 2022-02-14 2023-08-17 Caroma Industries Limited Water cleansing system and method for water usage environment
CN117522198A (en) * 2023-11-08 2024-02-06 永昊环境科技(集团)有限公司 An intelligent system and method for environmental sanitation monitoring
CN220671972U (en) * 2023-07-17 2024-03-26 山东新田野数字科技集团有限公司 Rural public toilet Internet of things management platform
CN119047712A (en) * 2024-10-30 2024-11-29 中国农业科学院农业环境与可持续发展研究所 Rural environment assessment method and system based on modern living environment conditions
CN119879353A (en) * 2025-03-26 2025-04-25 南京昊宇通医药科技有限公司 Bathroom environment intelligent control system based on internet of things

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090119142A1 (en) * 2007-11-05 2009-05-07 Sloan Valve Company Restroom convenience center
CN109919482A (en) * 2019-03-04 2019-06-21 元博科技(香港)有限公司 An intelligent public toilet cleaning management system and method
CN112785818A (en) * 2020-12-29 2021-05-11 武汉飞恩微电子有限公司 Method, device and sensor system for environmental detection of a vehicle
WO2023150841A1 (en) * 2022-02-14 2023-08-17 Caroma Industries Limited Water cleansing system and method for water usage environment
CN114979213A (en) * 2022-05-24 2022-08-30 新环(厦门)环境工程有限公司 Public toilet management system and method with deodorizer as control center
CN220671972U (en) * 2023-07-17 2024-03-26 山东新田野数字科技集团有限公司 Rural public toilet Internet of things management platform
CN117522198A (en) * 2023-11-08 2024-02-06 永昊环境科技(集团)有限公司 An intelligent system and method for environmental sanitation monitoring
CN119047712A (en) * 2024-10-30 2024-11-29 中国农业科学院农业环境与可持续发展研究所 Rural environment assessment method and system based on modern living environment conditions
CN119879353A (en) * 2025-03-26 2025-04-25 南京昊宇通医药科技有限公司 Bathroom environment intelligent control system based on internet of things

Similar Documents

Publication Publication Date Title
CN111913818B (en) Method for determining dependency relationship between services and related device
CN110879750B (en) Resource management method and terminal device
US9122560B2 (en) System and method of optimization for mobile apps
US9571347B2 (en) Reactive auto-scaling of capacity
US8510747B2 (en) Method and device for implementing load balance of data center resources
CN108270618B (en) Method, device and alarm system for alarm determination
CN103617038B (en) A kind of service monitoring method and device of distribution application system
CN107451853B (en) A method, device, system and storage medium for real-time distribution of red envelopes
CN110858843A (en) Service request processing method and device and computer readable storage medium
CN108762885B (en) Virtual machine creating method and device, management equipment and terminal equipment
CN111432247B (en) Traffic scheduling method, traffic scheduling device, server and storage medium
US20230037783A1 (en) Resource scheduling method and related apparatus
CN110708256A (en) CDN scheduling method, device, network device and storage medium
WO2014194704A1 (en) A grouping processing method and system
CN107944000A (en) Flight freight rate update method, device, electronic equipment, storage medium
CN108769157B (en) Message popup display method and device, computing equipment and computer storage medium
CN114185643B (en) Virtual machine scheduling method, device, equipment and storage medium
CN105893134A (en) Information processing method and electronic equipment
CN118509922A (en) Base station computing power resource scheduling method and device of computing power network, electronic equipment and storage medium
CN114422565B (en) A network connection management method based on connection pool and related device
CN120547199A (en) Public toilet environment management method, device, electronic equipment and medium based on the Internet of Things
CN108270839A (en) Access frequency control system and method
CN117194003A (en) Scheduling method, device, equipment, medium and program product for container deployment unit
CN114153609A (en) Resource control method and device, electronic equipment and computer readable storage medium
CN120547199B (en) Public toilet environment management method and device based on Internet of things, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant