Smart city maternal and infant room data information processing method
By deploying sensors in maternal and infant rooms and optimizing resource configuration using machine learning algorithms, the problems of supply and demand imbalance and inadequate equipment maintenance in traditional maternal and infant rooms during peak hours are solved, and more efficient resource utilization and better user experience are achieved.
Patent Information
- Application Number
- CN202510245532.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional maternal and child rooms have problems in use management and equipment maintenance, such as imperfect reservation systems and inadequate equipment maintenance, resulting in low usage efficiency and poor user experience, especially during peak hours, supply and demand imbalance.
By deploying sensors in maternal and infant rooms, usage data is collected and transferred to databases for storage and analysis, peak hours are identified and future demands are predicted through machine learning algorithms, and resource allocation and usage arrangements are optimized. At the same time, the Internet of Things technology is used to monitor the device status in real time, automatically alarm and record fault information.
Through intelligent resource allocation and use arrangement, the efficiency and user experience of maternal and infant rooms are improved, the inconvenience caused by equipment failure is reduced, resource allocation is optimized, waste is reduced, and the reliability of the equipment is ensured.
Smart Images

Figure CN120146504A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and more specifically, to a method for processing data information of a mother and baby room in a smart city. Background Art
[0002] With the continuous advancement of the construction of smart cities, the intelligent management of public service facilities has become an important direction for improving the quality of urban life. Among them, as a place that provides important services for mothers and infants in public spaces, the management and service level of mother and baby rooms directly affects the quality of family life and the livability of cities.
[0003] However, there are a series of problems in the actual operation of traditional mother and baby rooms. For example, the reservation system of mother and baby rooms is imperfect, and the facilities are often full during peak usage hours, resulting in many parents being unable to use the relevant facilities smoothly. In addition, equipment in mother and baby rooms, such as diaper changing tables, nursing chairs, water heaters, etc., often suffer from damage or inadequate maintenance due to long-term use, further affecting the user experience. Especially in commercial centers, transportation hubs and other places with large population mobility, the imbalance between supply and demand of mother and baby rooms is particularly prominent. Summary of the Invention
[0004] In view of the technical problems existing in the prior art, the present invention provides a method for processing data information of a mother and baby room in a smart city to solve the problems raised in the above background art.
[0005] The technical solution for the present invention to solve the above technical problems is as follows: A method for processing data information of a mother and baby room in a smart city specifically includes the following steps: Step 101: Deploy sensors inside the mother and baby room to collect usage data of the mother and baby room, including the number of people entering and leaving, usage duration, equipment status, and environmental temperature, and transmit the collected data to a database for storage; Step 102: Analyze the data stored in the database to identify peak usage hours, and predict future usage requirements through machine learning algorithms to optimize resource allocation; Step 103: Adjust the resource allocation and usage arrangement of the mother and baby room according to the data analysis and prediction results, and intelligently limit the number of reservation people during the predicted peak period; Step 104: Establish an equipment management database to record the usage conditions and fault information of the equipment, connect the equipment using Internet of Things technology, monitor its working status in real time, and automatically alarm for equipment with faults.
[0006] In a preferred embodiment, in step 101, deploying sensors inside the mother and baby room to collect usage data of the mother and baby room, including the number of people entering and leaving, usage duration, equipment status, and environmental temperature, and transmitting the collected data to a database for storage, the specific steps are as follows: Step A1. Data collection: Install two infrared access control sensors at the entrance of the mother and baby room to monitor the entrance and exit directions respectively. When a user enters the mother and baby room, the infrared sensor triggers an "entrance" signal, records the "entry" event and timestamp. When a user leaves the mother and baby room, the infrared sensor triggers an "exit" signal, records the "exit" event and timestamp. According to the recorded entry and exit events, calculate the number of people entering and leaving the mother and baby room as , and combine the entry and exit times of the user to obtain the usage duration as , where is the cumulative number of people in the previous time period, and are the newly recorded entry and exit times respectively, is the time when the sensor records the user's departure, is the time when the sensor records the user's entry; and monitor the status of the equipment in the mother and baby room and the ambient temperature through the switch sensor and temperature sensor; Step A2. Data transmission: Process the collected usage data for missing values and outliers and transmit it to the database for storage.
[0007] In a preferred embodiment, in step 102, analyze the data stored in the database, identify the peak usage periods, predict future usage requirements through machine learning algorithms, and optimize resource allocation. The specific steps are as follows: Step B1. Peak period analysis: Sort the usage data according to the timestamp to form a time series data set containing fields such as timestamp, number of users entering and leaving, usage duration, equipment status, and ambient temperature, denoted as , where represents the time of the nth record, the current number of users, the usage duration of the user in the mother and baby room, the status of the equipment in the mother and baby room, and the ambient temperature. In the formed data set, perform peak period analysis by calculating the number of users in each time period, which further includes the following steps: Step B101. Segment the timestamps of the entire data set by hour to obtain a set of time periods as , represents the start time of an hour, and aggregate the number of users entering and leaving in each time period to calculate the total number of users in each time period. The specific calculation formula is: , where represents the set of all data record indices in the kth time period, represents the total number of users in the kth time period, represents the number of users entering and leaving of the jth record; Step B102. Calculate the percentile of the number of users to determine the peak threshold. Set a percentile p. The specific calculation formula is: , where is the p-th percentile of the number of users, U is the set of the total number of users in all time periods, and when the number of users in a certain time period exceeds this threshold, it is regarded as a peak period; Step B2, User demand analysis: Extract features from the time series dataset and use the long short-term memory network algorithm to predict user demand, which further includes the following steps: Step B201, Feature extraction: Extract the time window feature hour from the timestamp, and calculate the rolling average and standard deviation of the number of users in the past n time points. The specific calculation formula is: , , where the input is the data of a past period of time, and the output is the predicted value of future demand, is the total number of users at time t, represents the average value of the total number of users in the past n time points, represents the standard deviation of the total number of users in the past n time points; Step B202, Construct an LSTM model: Combine the extracted features including time features, rolling average, and rolling standard deviation into an input matrix X, and use the future user demand as the target variable Y. In the LSTM network, it consists of an input gate, a forget gate, an output gate, and a fully connected layer. Through the fully connected layer of the LSTM, a mapping is performed to obtain the predicted value of future user demand. The output prediction formula is , where is the weight matrix of the fully connected layer, is the bias term, is the predicted future user demand, is the hidden state vector at the last time step; Step B203, Model training: Minimize the loss function through backpropagation and optimization algorithms to train the LSTM network. The formula of the loss function is: , where m is the number of samples, is the true user demand value of the g-th sample, is the predicted user demand value of the g-th sample. During the training process, the LSTM network gradually reduces the prediction error by continuously updating the weights and biases.
[0008] In a preferred embodiment, in step 103, according to the data analysis and prediction results, adjust the resource allocation and usage arrangement of the mother and baby room. During the predicted peak period, intelligently limit the number of reservation people. The specific steps are as follows: Step C1, Use the LSTM model to predict the number of reservation people in the future, and obtain the predicted value of the number of reservation people in the future time period as , based on the predicted data during the peak period and the actual capacity of the mother and baby room, set the maximum number of reservation people as , during peak hours, the restricted reservation number is , where is the actual restricted reservation number at time point t, is the maximum capacity, and respectively represent the number of rooms and the capacity of each room, is the predicted reservation number at time point t; Step C2: Set a buffer capacity , to cope with sudden increases in demand. During peak hours, in combination with the buffer capacity, by excluding the buffer from the maximum capacity, update the restricted reservation number to , where B is the set buffer capacity, is the buffer ratio coefficient; Step C3: Use an objective function to balance resource utilization and customer experience. The goal is to minimize resource waste and control crowd density, where is the predicted reservation number at time point t, is the maximum capacity, and the first term represents the part where the predicted number exceeds the maximum capacity, reflecting the crowd density situation; the second term represents the part where the actual reservation number is lower than the maximum capacity, reflecting the resource waste situation.
[0009] In a preferred embodiment, in step 104, an equipment management database is established to record the usage and fault information of the equipment, connect the equipment using Internet of Things technology, monitor its working status in real time, and automatically alarm for faulty equipment. The specific steps are as follows: Step D1: Equipment information entry: Create a database table structure to store equipment information, including equipment ID, equipment type, equipment working status, and usage duration. Detect the equipment operation status through sensors, and convert the equipment operation status from represented by. When the switch sensor detects that the equipment is in the "on" state, record it as the equipment being "in operation", representing , when the sensor detects that the state changes to "off", record it as the equipment being "stopped", representing ; Step D2: When the equipment is running, if the switch sensor shows that the equipment is "on" and the temperature sensor fails to detect the corresponding temperature change, mark the equipment status as "faulty". When the detected ambient temperature exceeds the safety threshold, mark it as equipment failure, immediately trigger the alarm mechanism, and send an alarm message to the management personnel. The alarm message includes the fault type, fault occurrence time, equipment ID, and type.
[0010] The beneficial effects of the present invention are as follows: Sensors are deployed inside the mother and baby room to collect usage data of the mother and baby room, including the number of people entering and leaving, usage duration, equipment status, and environmental temperature. The collected data is transmitted to a database for storage. The data stored in the database is analyzed to identify peak usage periods. Through machine learning algorithms, future usage demands are predicted to optimize resource allocation. According to the data analysis and prediction results, the resource allocation and usage arrangements of the mother and baby room are adjusted. During the predicted peak periods, the number of reservation is intelligently restricted. An equipment management database is established to record the usage conditions and fault information of the equipment. The Internet of Things technology is used to connect the equipment to monitor its working status in real time. An automatic alarm is issued for equipment with faults, which can remind the staff to handle equipment problems in a timely manner, reduce the inconvenience caused by equipment failures, ensure the good operation of the mother and baby room equipment, optimize resource allocation at the same time, reduce waste, improve the usage efficiency of the mother and baby room, enhance the user experience, and ensure the reliability of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a flowchart of the method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0012] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0013] In the description of the present application, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the described features. In the description of the present application, "a plurality" means two or more, unless otherwise specifically defined.
[0014] In the description of the present application, the term "for example" is used to mean "serving as an example, illustration, or explanation". Any embodiment described as "for example" in the present application is not necessarily construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to implement and use the present invention. In the following description, details are set forth for purposes of explanation. It should be understood that those of ordinary skill in the art can recognize that the present invention can be implemented without the use of these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but rather to be in line with the broadest scope consistent with the principles and features disclosed in the present application.
[0015] Embodiment 1 This embodiment provides a method for processing data information of a smart city mother and baby room as shown in Figure 1 and specifically includes the following steps: Step 101: Deploy sensors inside the mother and baby room to collect usage data of the mother and baby room, including the number of people entering and leaving, usage duration, equipment status, and environmental temperature, and transmit the collected data to the database for storage; Step 102: Analyze the data stored in the database, identify peak usage periods, and predict future usage requirements through machine learning algorithms to optimize resource allocation; Step 103: Adjust the resource allocation and usage arrangement of the mother and baby room according to the data analysis and prediction results, and intelligently limit the number of reservation people during the predicted peak period; Step 104: Establish an equipment management database to record the usage situation and fault information of the equipment, connect the equipment using Internet of Things technology, monitor its working status in real time, and automatically alarm for equipment with faults.
[0016] Preferably, in step 101, deploying sensors inside the mother and baby room to collect usage data of the mother and baby room, including the number of people entering and leaving, usage duration, equipment status, and environmental temperature, and transmitting the collected data to the database for storage, the specific steps are as follows: Step A1: Data collection: Install two infrared access control sensors at the entrance of the mother and baby room to monitor the entry and exit directions respectively. When a user enters the mother and baby room, the infrared sensor triggers an "entry" signal, records the "entry" event and timestamp. When a user leaves the mother and baby room, the infrared sensor triggers an "exit" signal, records the "exit" event and timestamp. According to the recorded entry and exit events, calculate the number of people entering and leaving the mother and baby room as , and combine the entry and exit times of the user to obtain the usage duration as , where is the cumulative number of people in the previous time period, and They are the number of new records entering and leaving respectively, is the time when the sensor records the user leaving, is the time when the sensor records the user entering; and the status of the equipment and the ambient temperature in the mother and baby room are monitored through a switch sensor and a temperature sensor; Step A2, Data transmission: Process the collected usage data for missing values and outliers and transmit it to the database for storage.
[0017] Preferably, in step 102, analyze the data stored in the database, identify the peak usage period, and predict the future usage demand through a machine learning algorithm to optimize resource allocation. The specific steps are as follows: Step B1, Peak period analysis: Sort the usage data according to the timestamp to form a time series dataset containing fields such as timestamp, number of users entering and leaving, usage duration, equipment status, and ambient temperature, denoted as , where, represents the time of the nth record, the current number of users, the usage duration of the user in the mother and baby room, the status of the equipment in the mother and baby room, and the ambient temperature. In the formed dataset, analyze the peak period by calculating the number of users in each time period, which further includes the following steps: Step B101, Segment the timestamps of the entire dataset by hour to obtain a set of time periods as , represents the start time of an hour, and aggregate the number of users entering and leaving in each time period to calculate the total number of users in each time period. The specific calculation formula is: , where, represents the set of all data record indices in the kth time period, represents the total number of users in the kth time period, represents the number of users entering and leaving of the jth record; Step B102, Calculate the percentile of the number of users to determine the peak threshold. Set a percentile p. The specific calculation formula is: , where, is the p percentile of the number of users, U is the set of the total number of users in all time periods. When the number of users in a certain time period exceeds this threshold, it is regarded as a peak period, and a curve graph of the time period and the number of users is generated; Step B2, User demand analysis: Split the time series dataset into a training set and a test set, extract features from the time series dataset, and use a long short-term memory network algorithm to predict user demand. It further includes the following steps: Step B201, Feature Extraction: Extract the time window feature hour from the timestamp, and calculate the rolling average and standard deviation of the number of users at the past n time points. The specific calculation formula is as follows: , , where the input is the data for a past period, and the output is the predicted value of future demand. is the total number of users at time t, represents the average value of the total number of users at the past n time points, represents the standard deviation of the total number of users at the past n time points; Step B202, Construct an LSTM model: Combine the extracted features including time features, rolling average, and rolling standard deviation into an input matrix X, and use the future user demand as the target variable Y. In the LSTM network, it consists of an input gate, a forget gate, an output gate, and a fully connected layer. Through the mapping of the fully connected layer of the LSTM, the predicted value of the future user demand is obtained. The output prediction formula is , where is the weight matrix of the fully connected layer, is the bias term, is the predicted future user demand, is the hidden state vector at the last time step; Step B203, Model Training: Minimize the loss function through backpropagation and optimization algorithms to train the LSTM network. The formula of the loss function is: , where m is the number of samples, is the true user demand value of the gth sample, is the predicted user demand value of the gth sample. During the training process, the LSTM network gradually reduces the prediction error by continuously updating the weights and biases.
[0018] Preferably, in step 103, according to the data analysis and prediction results, adjust the resource allocation and usage arrangement of the mother and baby room. During the predicted peak period, intelligently limit the number of reservation people. The specific steps are as follows: Step C1, Use the LSTM model to predict the number of reservation people in the future, and obtain the predicted value of the number of reservation people in the future period as . Based on the predicted data during the peak period and the actual capacity of the mother and baby room, set the maximum number of reservation people as . During the peak period, limit the number of reservation people to , where is the actual limited number of reservation people at time point t, is the maximum capacity, and respectively represent the number of rooms and the capacity of each room, is the predicted number of reservation people at time point t; Step C2: To avoid excessive resource strain, set a buffer capacity , to cope with sudden increases in demand. During peak hours, in combination with the buffer capacity, update the restricted reservation number by excluding the buffer from the maximum capacity to , where B is the set buffer capacity, is the buffer ratio coefficient; Step C3: Use an objective function to balance resource utilization and customer experience. The goal is to minimize resource waste and control crowd density, where is the predicted reservation number at time point t, is the maximum allowable number of people. The first term represents the part where the predicted number exceeds the maximum capacity, reflecting the crowd density situation; the second term represents the part where the actual reservation number is lower than the maximum capacity, reflecting the resource waste situation.
[0019] Preferably, in step 104, establish an equipment management database to record the usage and fault information of the equipment, connect the equipment using Internet of Things technology, monitor its working status in real time, and automatically alarm for faulty equipment. The specific steps are as follows: Step D1: Equipment information entry: Create a database table structure to store equipment information, including equipment ID, equipment type, equipment working status, and usage duration. Detect the equipment operation status through sensors, and represent the equipment operation status by . When the switch sensor detects that the equipment is in the "on" state, record it as the equipment being "in operation", representing . When the sensor detects that the state changes to "off", record it as the equipment being "stopped", representing ; Step D2: During equipment operation, when the data provided by the switch sensor and the temperature sensor are inconsistent, and the switch sensor shows that the equipment is "on" while the temperature sensor fails to detect the corresponding temperature change, mark the equipment status as "faulty". When the detected ambient temperature exceeds the safety threshold, mark it as equipment failure, immediately trigger the alarm mechanism, and send an alarm message to the management personnel. The alarm message includes the fault type, fault occurrence time, equipment ID, and type.
[0020] It should be noted that in the above embodiments, the descriptions of each embodiment have their own focuses. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0021] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0022] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0023] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0024] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, such that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0025] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0026] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. A method for processing data information of a mother-and-child room in a smart city, characterized in that: The specific steps include: Step 101: Deploy sensors in the maternal and infant room to collect usage data of the maternal and infant room, including the number of people entering and leaving the room, usage time, equipment status, and ambient temperature, and transmit the collected data to a database for storage; Step 102: Analyze the data stored in the database, identify the peak usage period, predict future usage demand through machine learning algorithms, and optimize resource allocation; Step 103: According to the data analysis and prediction results, the resource allocation and use arrangement of the mother-and-child room are adjusted, and the number of reservations is intelligently limited during the expected peak period; Step 104: Establish an equipment management database to record equipment usage and fault information, use the Internet of Things technology to connect equipment, monitor its working status in real time, and automatically alarm for equipment with faults.
2. A method for processing data information of a mother-and-child room in a smart city according to claim 1, characterized in that: In step 101, sensors are deployed in the mother-and-child room to collect usage data of the mother-and-child room, including the number of people entering and leaving the room, usage time, equipment status, and ambient temperature, and the collected data is transmitted to a database. The specific steps are as follows: Step A1, data collection: two infrared access control sensors are installed at the entrance of the mother and baby room to monitor the direction of entry and exit respectively. When the user enters the mother and baby room, the infrared sensor triggers the "entry" signal, records the "entry" event and timestamp, and when the user leaves the mother and baby room, the infrared sensor triggers the "exit" signal, records the "exit" event and timestamp. According to the recorded entry and exit events, the number of people entering and leaving the mother and baby room is calculated. , combined with the time when the user enters and leaves, the usage time is ,in, is the cumulative number of people in the previous time period, and are the number of new records entering and leaving, It is the time when the sensor records the user's departure. The sensor records the time when the user enters; and the switch sensor and temperature sensor monitor the status of the equipment and the ambient temperature in the mother-and-child room; Step A2, data transmission: the collected usage data is processed for missing values and outliers and transmitted to the database for storage.
3. A method for processing data information of a mother-and-child room in a smart city according to claim 1, characterized in that: In step 102, the data stored in the database is analyzed to identify the peak usage period, and the future usage demand is predicted through a machine learning algorithm to optimize resource allocation. The specific steps are as follows: Step B1, peak time analysis: sort the usage data by timestamp to form a time series data set containing timestamp, number of users entering and leaving, usage time, device status and ambient temperature fields, expressed as ,in, Indicates the time of the nth record, the current number of users, the duration of use of the user in the maternity and infant room, the status of the equipment in the maternity and infant room, and the ambient temperature. In the resulting data set, the number of users in each time period is calculated to perform peak time analysis; Step B2: User demand analysis: Extract features from the time series data set and use the long short-term memory network algorithm to predict user needs.
4. A method for processing data information of a mother-and-child room in a smart city according to claim 3, characterized in that: In the step B1, peak time period analysis is performed by calculating the number of users in each time period, and the peak time period analysis further includes the following steps: Step B101: segment the timestamp of the entire data set by hour to obtain a set of time periods: , Indicates the start time of an hour, aggregates the number of users entering and leaving each time period, and calculates the total number of users in each time period. The specific calculation formula is: ,in, represents the index set of all data records in the kth time period, represents the total number of users in the kth time period, Indicates the number of users entering and leaving the jth record; Step B102: Calculate the percentile of the number of users to determine the peak threshold, set a percentile p, and the specific calculation formula is: ,in, is the p percentile of the number of users, U is the total number of users in all time periods, and when the number of users in a certain time period exceeds the threshold, it is considered a peak period.
5. A method for processing data information of a mother-and-child room in a smart city according to claim 3, characterized in that: In the user demand analysis of step B2, feature extraction is performed from the time series data set, and a long short-term memory network algorithm is used to predict user demand, further comprising the following steps: Step B201, feature extraction: extract the time window feature hour from the timestamp, calculate the rolling average and standard deviation of the number of users at the past n time points, and the specific calculation formula is: , , where the input is the data of the past period of time, and the output is the future demand forecast value. is the total number of users at time t, Represents the average total number of users at the past n time points, Represents the standard deviation of the total number of users at the past n time points; Step B202, build LSTM model: combine the extracted features including time features, rolling mean, and rolling standard deviation into input matrix X, and take future user demand as target variable Y. In LSTM network, it is composed of input gate, forget gate, output gate and fully connected layer. Map through the fully connected layer of LSTM to obtain the future user demand forecast value. The output forecast formula is ,in, is the weight matrix of the fully connected layer, is the bias term, is the predicted future user demand, is the hidden state vector at the last time step; Step B203, model training: Minimize the loss function through back propagation and optimization algorithm to train the LSTM network. The loss function formula is: , where m is the number of samples, is the real user demand value of the g-th sample, is the user demand value predicted by the g-th sample.
6. A method for processing data information of a mother-and-child room in a smart city according to claim 1, characterized in that: In step 103, according to the data analysis and prediction results, the resource allocation and use arrangement of the mother-and-child room are adjusted, and the number of reservations is intelligently limited during the expected peak period. The specific steps are as follows: Step C1: Use the LSTM model to predict the number of future appointments, and get the predicted value of the number of appointments in the future period as According to the peak forecast data and the actual capacity of the maternity and infant rooms, the maximum number of reservations is set at During peak hours, the number of reservations is limited to ,in, is the actual limit on the number of reservations at time point t, is the maximum number of people that can be accommodated. and Respectively represent the number of rooms and the number of people each room can accommodate. is the predicted number of reservations at time point t; Step C2: Set a buffer capacity To cope with sudden increases in demand, during peak hours, combined with the buffer capacity, the limit on the number of reservations is updated by removing the buffer from the maximum capacity. , where B is the set buffer capacity, is the buffer ratio coefficient; Step C3: Use an objective function To balance resource utilization and customer experience, the goal is to minimize resource waste and control crowd density, among which, is the predicted number of reservations at time point t, is the maximum number of people that can be accommodated, the first item The predicted number of people exceeds the maximum capacity, reflecting the density of the crowd. The part indicating that the actual number of reservations is lower than the maximum capacity reflects the waste of resources.
7. A method for processing data information of a mother-and-child room in a smart city according to claim 1, characterized in that: In step 104, a device management database is established to record the usage and fault information of the device, and the device is connected using the Internet of Things technology to monitor its working status in real time, and an automatic alarm is given for a faulty device. The specific steps are as follows: Step D1, device information entry: Create a database table structure to store device information, including device ID, device type, device working status, and usage time. Use sensors to detect the device operating status and store the device operating status from Indicates that when the switch sensor detects that the device is in the "on" state, it is recorded as the device "working", indicating When the sensor detects that the state has changed to "off", it is recorded as the device "down", indicating ; Step D2: When the device is running, when the switch sensor shows that the device is "on", the temperature sensor fails to detect the temperature change and marks the device status as "fault". When the ambient temperature is detected to exceed the safety threshold, it is marked as a device failure, and the alarm mechanism is immediately triggered. An alarm message is sent to the management personnel, and the alarm message includes the fault type, fault occurrence time, device ID and type.