Method for predicting replenishment work order based on multi-modal data
By deploying detection devices in restrooms and building multimodal data prediction models, replenishment work orders are automatically generated, solving the problems of real-time availability and resource waste in traditional toilet paper management, and achieving precise management and efficient replenishment of toilet paper supply.
Patent Information
- Application Number
- CN202511210221.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-11-21
AI Technical Summary
Traditional toilet paper management relies on manual inspections, which cannot keep track of usage in real time, leading to toilet paper supply disruptions or overstocking. Furthermore, it is difficult to adapt to the diverse needs of different restrooms, resulting in high management costs and serious resource waste.
Deploy visitor flow and temperature/humidity detection devices in restrooms, build a multimodal data prediction model, and automatically generate replenishment work orders by combining visitor flow, weather, and activity data, and select the optimal storage room for replenishment.
It enables real-time monitoring and accurate prediction of toilet paper usage, avoiding shortages or overstocking, improving resource utilization efficiency, and reducing management costs.
Smart Images

Figure CN120996722A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method for predicting replenishment work orders based on multimodal data. Background Technology
[0002] In large public places such as shopping malls, airports, and train stations, toilet paper supply management in restrooms faces numerous challenges. Traditional toilet paper management methods mainly rely on regular manual inspections and replenishment, which has significant drawbacks. On the one hand, manual inspections cannot monitor toilet paper usage in real time, making it difficult to detect shortages promptly. This can lead to toilet paper supply disruptions, causing inconvenience to users and impacting the service quality and user experience. On the other hand, manual inspections and replenishment lack scientific planning, easily resulting in overstocking or understocking of toilet paper, increasing management costs and wasting resources.
[0003] Furthermore, toilet paper usage varies significantly across different restrooms due to factors such as customer traffic and usage habits, making a uniform management model inadequate for such diverse needs. Moreover, in large venues where restrooms and storage areas are widely distributed, efficiently arranging replenishment routes and delivery personnel is a pressing issue. Therefore, an intelligent toilet paper management system is needed to achieve precise management and efficient replenishment of toilet paper supply. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by providing a method for predicting replenishment work orders based on multimodal data, thereby solving the problems existing in the prior art.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for predicting replenishment work orders based on multimodal data, the method comprising:
[0006] Visitor flow detection devices and temperature and humidity detection devices are deployed in each restroom, and each restroom’s visitor flow detection device and temperature and humidity detection device regularly sends visitor flow detection data and remaining quantity detection data to a remote platform.
[0007] Configure a corresponding toilet data table and a storage room data table for each toilet and storage room; and perform daily initialization and updates for the toilet data table and the storage room data table;
[0008] Construct a toilet paper remaining quantity prediction model and periodically train the model using a new training dataset.
[0009] Configure a corresponding toilet paper packaging type and set a corresponding excess threshold for each restroom. hold Set the corresponding maximum margin umax The weight of a single small package is recorded as m1, and the weight of a single large roll is recorded as m2.
[0010] Set the current bathroom data table and toilet paper packaging type as the current table and current packaging type;
[0011] Periodically record the most recently updated record in the current table as R at a preset frequency. end The record in the table where the most recent toilet paper balance is 0 is denoted as R0. The next record in the table after R0 is denoted as R. sta ; and for the current table from R sta To R end Total number of records N R Perform statistics; and R end The time scale is denoted as time t end The amount of toilet paper remaining is recorded as the surplus amount u. end ;
[0012] For u end and u hold Perform a comparison; if u end >u hold Set duration L = 0;
[0013] If u end ≤u hold Then for N R Compare with K; if N R If ≤K, then based on R sta ->R end N R N records generated R indivual And additionally generate (KN) R ) all zeros And from the obtained K x k Form X; if N R If the value is greater than K, then K x's will be generated based on the K most recently updated records in the current table. k Form X; and input X into the prediction model M to predict Yx, and set the duration L = Y;
[0014] If L > 0, then identify the current packaging type; if the current packaging type is an individual small package, then set the replenishment quantity n. add =u max / m1, and store the most recently updated record's independent small package size greater than n. add The warehouse corresponding to the warehouse data table is recorded as the candidate warehouse; if the current packaging type is bulk roll packaging, then set the replenishment quantity n. add =u max / m2, and store the largest volume package containing the most recently updated record that is greater than n. addThe warehouse corresponding to the warehouse data table is recorded as the candidate warehouse;
[0015] If the total number of candidate storage rooms is greater than zero, then based on delivery matrix A, the storage room closest to the current restroom is selected as the current storage room; and based on the real-time location feedback from each delivery person's mobile client, the delivery person closest to the current storage room is selected as the target client; and based on the preset priority-duration correspondence, the priority level that meets L is selected as the replenishment priority; and the latest replenishment time is calculated as t. end +L; and use the unique identifier of the current restroom and storage room as the restroom identifier for replenishment and the storage room identifier for pickup; set the replenishment packaging type based on the current packaging type; and send the replenishment work order composed of the obtained restroom identifier for replenishment, storage room identifier for pickup, replenishment priority, latest replenishment time, replenishment packaging type, and replenishment quantity to the target client.
[0016] In one possible implementation, the deployment of visitor flow detection devices and temperature and humidity detection devices in each restroom specifically includes:
[0017] Each restroom is equipped with a visitor flow detection device and a temperature and humidity detection device, and a toilet paper supply device is installed at the entrance of each restroom.
[0018] In one possible implementation, the restroom data table includes a time scale, passenger flow, temperature, humidity, rainfall, activity markers, and toilet paper remaining; the storage room data table includes a time scale, individual small package storage quantity, and large roll package storage quantity; daily initialization of the restroom data table and the storage room data table specifically includes:
[0019] At the start of each day, based on the time difference Δt, n = 24 * 60 * 60 / Δt empty records are added to each toilet data table and each storage room data table; and based on the start time, end time and Δt of the day, the time scale column of the n empty records added that day is set.
[0020] In one possible implementation, updating the toilet data table and the storage room data table specifically includes:
[0021] For each restroom receiving passenger flow detection data, the passenger flow detection data includes time and passenger flow. The time and passenger flow of the current passenger flow detection data are used as time t1 and passenger flow x1; the passenger flow column of the restroom data table of the current restroom is used as the current column; the last non-empty field in the current column is used as passenger flow x0; and the time scale corresponding to passenger flow x0 is used as time t0.
[0022] Divide the time interval [t0, t1] equally based on the time difference Δt to obtain Each point in time is an integer, and int() is the integer function; each point in time is aligned with a time scale.
[0023] Based on linear interpolation, and according to passenger flow x0 and x1, the passenger flow x at M time points in the time period [t0, t1] is calculated. m Perform the calculation; 1≤m≤M; obtain the M passenger flow values x m As the M passenger flow field values corresponding to the M time scales, they are sequentially filled into the current column;
[0024] For each toilet's remaining quantity detection data received, the remaining quantity detection data includes time and toilet paper remaining quantity; the time and toilet paper remaining quantity of the current remaining quantity detection data are used as time t1 and remaining quantity x1; the toilet paper remaining quantity column of the toilet data table for the current toilet is used as the current column; the last non-empty field in the current column is used as the remaining quantity x0; and the time scale corresponding to the remaining quantity x0 is used as time t0;
[0025] Divide the time interval [t0, t1] equally based on the time difference Δt to obtain Each time point m;
[0026] Compare the remaining quantities x0 and x1. If x0 < x1, it indicates that a replenishment occurred in the middle. Forcefully estimate a zero point m among these M time points. * m * ≤M-1; where, in the current column, the remaining quantity x0 is taken from the previous remaining quantity field. -1 And calculate the zero-value time of the remaining amount. Then for t * Make a judgment if t * >t1, or t * ∈[t0, t1] but (t1-t * If ) < Δt, then the (M-1)th time point is forcibly taken as the zero point m. * =M-1; if t * ∈[t0, t1] and (t1-t * If )≥△t, then among these M time points, the one with respect to t * The closest point in time is taken as the zero point m. * ;
[0027] Estimate the zero point m * Then, for 1≤m≤m * m * At each time point, based on linear interpolation, and following the uniform decreasing trend of the remaining quantity from x0 to 0, the time interval [t0, t...] is... * m on ] * The remaining amount at each time point x m Perform calculations; for m* <m≤M of Mm * At each time point, based on the linear interpolation method and the uniform increasing trend of the remaining amount from 0 to x1, the time period [t] is analyzed. * Mm on t1] * The remaining amount at each time point x m Perform calculations;
[0028] We obtain M remaining quantities x m Next: The resulting M remaining quantities x m As the values of the M remaining toilet paper quantities at the corresponding M time scales, they are sequentially filled into the current column;
[0029] If x0 ≥ x1, then based on linear interpolation, the remaining quantities x0 and x1 are used to calculate the remaining quantities x at M time points in the time interval [t0, t1] in a uniformly decreasing manner. m Perform the calculation; and obtain the M remaining quantities x m As the values of the M toilet paper remaining quantities at the corresponding M time scales, they are sequentially filled into the current column.
[0030] In one possible implementation, the method further includes:
[0031] Weather data is obtained by periodically collecting weather parameters of the external environment of each restroom location through a weather query interface; the weather parameters include temperature, humidity, and precipitation; the weather data includes time, temperature, humidity, and precipitation.
[0032] When the weather data for each restroom is collected, the time, temperature, humidity, and precipitation of the current weather data are used as time t1, temperature x1, humidity y1, and precipitation z1.
[0033] And use the temperature, humidity, and rainfall columns from the current bathroom data table as the first, second, and third columns;
[0034] The last non-empty field in the first column is taken as temperature x0; and the time scale corresponding to temperature x0 is taken as time. The last non-empty field in the second column is set as humidity y0; and the time scale corresponding to humidity y0 is set as time. The last non-empty field in the third column is taken as the precipitation amount z0; and the time scale corresponding to the precipitation amount y0 is taken as the time.
[0035] Based on the time difference Δt, the time period is divided into time periods. Divide equally to obtain
[0036] Based on linear interpolation, and according to temperatures x0 and x1, the time period is... Up M 1 Temperature at a given moment Perform the calculation; 1≤m 1 ≤M 1 ; and the resulting M 1 Temperature As the corresponding M 1 M on a time scale 1 The temperature field values are sequentially entered into the first column;
[0037] Based on linear interpolation, and according to humidity y0 and y1, the time period is... Up M 2 Humidity at a given time point Perform the calculation; 1≤m 2 ≤M 2 ; and the resulting M 2 Humidity As the corresponding M 2 M on a time scale 2 Enter the humidity field values sequentially into the second column;
[0038] Based on linear interpolation, and according to precipitation z0 and z1, the time period is... Up M 3 Precipitation at a given time point Perform the calculation; 1≤m 3 ≤M 3 ; and the resulting M 3 Rainfall As the corresponding M 3 M on a time scale 3 Fill the precipitation field values sequentially into the third column;
[0039] By using the commercial / social activity notification / promotion interface of each restroom location, the corresponding activity calendar data is obtained by setting the external environment activity calendar of each restroom location. The activity calendar data includes activity type and activity time period. Activity type includes promotional activities and performance activities. The activity time period is a time period parameter with the smallest unit being the hour.
[0040] For each instance of receiving activity calendar data for the external environment of a restroom location, the activity period of the current activity calendar data is used as the time period T[t]. s , t e ]; Set the active marker column of the current bathroom data table as the current column; set the last non-empty field in the current column as the active marker x0; and set the time scale corresponding to the active marker x0 as the time t0;
[0041] Based on the time difference Δt, the time period [t0, t] is... s Divide equally to obtain The Mth time point; and the Mth time point 1 The time corresponding to each moment point is used as And based on the time difference Δt, the time period is divided into Divide equally to obtain A point in time;
[0042] In the current column, it will be compared with the time period [t0, t... s The corresponding M 1 M on a time scale 1 The activity flag field value is set to no activity, and will be associated with the time period. The corresponding M 2 M on a time scale 2 The activity flag field value is set to "Active";
[0043] For each warehouse receiving the total outbound volume, the total outbound volume includes time, the outbound volume of individual small packages, and the outbound volume of large roll packages. The time, outbound volume of individual small packages, and outbound volume of the current total outbound volume are set as time t1, small package quantity x1, and large roll quantity y1; and the individual small package storage quantity and large roll package storage quantity columns of the current warehouse data table are set as the first column and the second column, respectively.
[0044] Take the last non-empty field in the first column as the small package quantity x0; and take the time scale corresponding to the small package quantity x0 as the time. The last non-empty field in the second column is taken as the large volume y0; and the time scale corresponding to the large volume y0 is taken as the time.
[0045] Based on the time difference Δt, the time period is divided into time periods. Divide equally to obtain
[0046] The first M 1 -1 time point small package quantity Let all be x0, Mth 1 Small package volume at a given moment Let it be (x0-x1), and then the resulting M 1 Small package quantity As the corresponding M 1 M on a time scale 1 The values for the storage capacity of each individual small package should be entered sequentially into the first column.
[0047] The first M 2 Large volume at -1 time point Let all be y0, Mth. 2 Large volume at a specific point in time Let it be (y0-y1), and then the resulting M 2Large volume As the corresponding M 2 M on a time scale 2 The values of the large volume packaging storage capacity field are sequentially filled into the second column.
[0048] In one possible implementation, the construction of the toilet paper remaining quantity prediction model specifically includes:
[0049] The observation vector sequence X consists of a fixed number of K observation vectors x k The order is sequential, 1≤k≤K; each observation vector x k It consists of 6 observation data: passenger flow f k Rainfall r k Temperature p k Humidity k Activity marker g k Remaining quantity u k ;
[0050] The method for obtaining the observation vector sequence X is as follows:
[0051] Use the toilet data table of the specified toilet as the current data table, and use the toilet paper remaining column of the current data table as the current column;
[0052] The field in the current column with the closest 0 value to the current time is selected as the most recent zero value field.
[0053] Use the time scale corresponding to the most recent zero value field as the starting time t. s Set the current time t now As the end time t e ;
[0054] From the current start time t s and end time t e Composing the most recent floating period T[t s , t e ];
[0055] For the current data table, the data in the most recent floating period T[t] s , t e The total number of time scales within the range is counted to obtain N. t ; and in the current data table, the data in the most recent floating period T[t] will be displayed. s , t e N t The extracted data records are sorted sequentially to form the corresponding first record sequence;
[0056] For N t Compare with K:
[0057] If N tIf K ≤ K, then the passenger flow / rainfall / temperature / humidity / activity marker / toilet paper remaining fields of each data record in the first record sequence will be treated as a corresponding group. Form a corresponding observation vector Regeneration (KN) t ) zero-value vectors of length 6
[0058] If N t If K > K, then based on K for the most recent floating period T[t] s , t e Perform equal-interval sampling to obtain K sampling times t. k ; and for all sampling times t k Perform one round of traversal; and during this round of traversal, record the sampling time t of the current traversal. k As of the current time t * ; and compare the time scale in the first record sequence with t * Identical data records are used as corresponding matching records; and the system identifies whether a matching record is empty; if a matching record is not empty, the fields of passenger flow / rainfall / temperature / humidity / activity markers / toilet paper remaining in the matching record are used as a set of corresponding f. k r k p k s k g k u k Form a corresponding observation vector x k If the matching record is empty, then the first record sequence containing records matching t will be... * Let t be the closest pair of consecutive times. pre t post And according to the interpolation method based on t pre t post The fields of passenger flow / rainfall / temperature / humidity / activity markers / toilet paper remaining amount are used to calculate t. * Passenger flow / rainfall / temperature / humidity / event signage / toilet paper remaining f k r k p k s k g k u k Form a corresponding observation vector x k ;
[0059] From the obtained K observation vectors x k The order of these sequences forms the corresponding observation vector sequence X.
[0060] In one possible implementation, the toilet paper remaining quantity prediction model includes a feature splitting module, a first Bi-LSTM model + a first linear network, a second Bi-LSTM model + a second linear network, a first MLP model, a second MLP model, an attention-weighted fusion module, a feature fusion module, and a third linear network.
[0061] The feature-based traffic splitting module is used for:
[0062] The K passenger flow values f of the observed vector sequence X k The sequential sorting forms the feature sequence F{f k};
[0063] A set of precipitation r corresponding to each index k k Temperature p k Humidity k Comprising an environmental feature e k And composed of K environmental features e k The sequential sorting forms the feature sequence E{e k (r k p k s k )};
[0064] For each activity tag g k Binarization encoding conversion is performed to obtain Then, K activity codes Sequential sorting forms the feature vector
[0065] K remaining quantities u k The feature vector U{u} is formed by sequential sorting. k};
[0066] Send F, E, G, and U to the corresponding first Bi-LSTM model, second Bi-LSTM model, first MLP model, and second MLP model, respectively;
[0067] The first Bi-LSTM model plus the first linear network form an STL feature decomposer for passenger flow.
[0068] The first Bi-LSTM model is used to process the feature sequence F{f k Bidirectional feature encoding is performed to obtain the corresponding left-hand feature vector. Right-directed eigenvectors And for the left and right eigenvectors The corresponding feature vector H is obtained by concatenation. 1 Send to the first linear network, where the left and right eigenvectors are... The feature dimensions are all preset to D1, and the shapes are all D1×K; the feature vectors H 1 The shape is D1×2K;
[0069] The first linear network consists of two or more linear layers connected sequentially, each linear layer consisting of a fully connected layer and a ReLU function; the first linear network is used to determine the feature vector H. 1 STL feature vector prediction yields a feature vector H of shape 3×K. 5 Send the feature vector H to the attention-weighted fusion module. 5 It consists of three components The components correspond to the three feature dimensions of STL features; the three feature dimensions include seasonality (S), trend (T), and residual (L) feature dimensions.
[0070] The second Bi-LSTM model plus the second linear network form an STL feature decomposer for environmental features; where environmental features include precipitation, temperature, and humidity.
[0071] The second Bi-LSTM model is used to process the feature sequence E{e k (r k p k s k Bidirectional feature encoding is performed to obtain the corresponding left-hand feature vector. Right-directed eigenvectors And for the left and right eigenvectors The corresponding feature vector H is obtained by concatenation. 2 Send to the second linear network, where the left and right eigenvectors are... The feature dimensions are all preset to D2, and the shapes are all D2×K; the feature vectors H 2 The shape is D2×2K;
[0072] The second linear network consists of two or more linear layers connected sequentially. Each linear layer is composed of a fully connected layer and a ReLU function. The second linear network is used to determine the feature vector H. 2 STL feature vector prediction yields a feature vector H of shape 3×K. 6 Send the feature vector H to the attention-weighted fusion module. 6 It consists of three components The components correspond to the three feature dimensions of STL features;
[0073] The first MLP model is used to process feature vectors. The activity feature encoding is performed to obtain the corresponding feature vector H. 3 Send the feature vector H to the attention-weighted fusion module 3 The shape is 3×K;
[0074] The second MLP model is used to process the feature vector U{u k The residual feature encoding is performed to obtain the corresponding feature vector H. 4 Send the feature vector H to the feature fusion module 4 The shape is 3×K;
[0075] The attention-weighted fusion module is based on three weight vectors W Q W K W V For the eigenvector H 3 H 6 H 5 Perform the corresponding query, key, and value vector transformation to obtain the corresponding query vector H. Q =W Q H 3 , bond vector H K =W K H 6 Value vector H V =W V H 5 ; and based on query vector H Q , bond vector H K Value vector H V Perform attention operations and use the result as the corresponding feature vector H. 7 =Attention(H Q H K H V Send the feature vector H to the feature fusion module. 7 The shape is 3×K;
[0076] The feature fusion module is used to process the feature vector H 4 H 7 Feature fusion is performed to obtain the feature vector H 8 =H 4 ⊙H 7 Send to the third linear network; ⊙ represents the Hadamard product; eigenvector H 8 The shape is 3×K;
[0077] The third linear network is composed of the first and second linear layers connected sequentially. The first linear layer consists of a fully connected layer plus a ReLU function, and the second linear layer consists of a fully connected layer plus a Sigmoid function. The third linear network is used to determine the feature vector H. 8 Perform regression prediction on the time it takes for the current amount of toilet paper in the bathroom to run out, and output the corresponding predicted duration Y.
[0078] In one possible implementation, the periodic training of the toilet paper remaining quantity prediction model by periodically creating new model training datasets specifically includes:
[0079] The first dataset includes multiple first data records; each first data record includes a training sequence X. tr and tag duration Y tag Training sequence X tr The data format is consistent with the observation vector sequence X;
[0080] The method for constructing the first dataset is as follows:
[0081] Record each record in the toilet paper remaining quantity field of the bathroom data table that is 0 as a zero-value record; and record the total number N of zero-value records. zero Perform statistics; and divide the first to the Nth... zero The contents of the table containing the zero-value records are denoted as a sub-data table; and the sub-data table is divided into N sub-tables using each zero-value record as a dividing point. zero -1 segments are created, and zero-value records in each segment are removed to obtain N. zero -1 segmented sub-table;
[0082] Each segmented sub-table is used as the current sub-table; and the total number of time scales in the current sub-table is used as the corresponding table length L. seg ; and for L seg Compare with a fixed length K; if L seg If K ≤ K, then the passenger flow / rainfall / temperature / humidity / activity marker / toilet paper remaining fields of each record in the current sub-table will be treated as a corresponding group. Form a corresponding Regeneration (KL) seg ) zero-value vectors of length 6 Then, from the obtained K observation vectors x k Form the corresponding training sequence X tr If L seg If the value is greater than K, then L will be divided according to the preset sliding partitioning mechanism. seg The data is divided into multiple sliding segments of length K, and K corresponding observation vectors x are generated based on the K records of each sliding segment. k To form a corresponding training sequence X tr ;
[0083] Each training sequence X tr This is used as the current training sequence; and the time scale corresponding to the last non-zero vector of the current training sequence is used as time t. 1 And the next zero-value time corresponding to the segment sub-table of the current training sequence is taken as the corresponding time t. 2 and t 2 -t 1The obtained duration is used as the corresponding tag duration Y. tag ;
[0084] From each training sequence X tr and its corresponding tag duration Y tag A corresponding first data record is formed; and all the obtained first data records form the first dataset.
[0085] In one possible implementation, a corresponding delivery matrix A is set up for all restrooms and all storage rooms; each row of A corresponds to one storage room, and each column corresponds to one restroom. Let the total number of storage rooms be H, and the total number of restrooms be W. Then, the delivery matrix A consists of H×W matrix units a. i,j Composition, 1 ≤ column index i ≤ W, 1 ≤ row index j ≤ H, each matrix element a i,j Let be the length of the delivery path from the j-th storage room to the i-th restroom.
[0086] In a second aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor using the method for predicting replenishment work orders based on multimodal data as described in any one of the first aspects.
[0087] The method for predicting replenishment work orders based on multimodal data provided by this invention has the following technical effects:
[0088] Real-time and accurate monitoring. By deploying passenger flow detection devices and temperature and humidity detection devices in each restroom, and regularly sending passenger flow detection data and remaining toilet paper detection data to a remote platform, the toilet paper usage and environmental conditions of each restroom can be monitored in real time and accurately, providing a reliable basis for subsequent management decisions.
[0089] Scientifically predict and replenish toilet paper levels. A model for predicting toilet paper remaining quantities in restrooms is built and regularly trained and optimized. Combined with historical data from restroom data tables, it can accurately predict the remaining amount of toilet paper and its usage duration. Based on the prediction results, replenishment time and quantity are rationally scheduled to avoid toilet paper shortages or overstocking, improving resource utilization efficiency and reducing management costs.
[0090] Intelligent warehouse matching. Based on the toilet paper packaging type and replenishment quantity, the system automatically filters out suitable candidate warehouses and selects the nearest warehouse based on the delivery matrix, ensuring timely and efficient replenishment and reducing delivery time and costs. Attached Figure Description
[0091] Figure 1 This is a schematic diagram of the method for predicting replenishment work orders based on multimodal data provided in an embodiment of the present invention;
[0092] Figure 2This is an architecture diagram for predicting replenishment work orders based on multimodal data, provided in an embodiment of the present invention.
[0093] Figure 3 A distribution matrix structure diagram showing the warehouse and restroom areas;
[0094] Figure 4 A structural diagram of a toilet paper surplus prediction model for restrooms;
[0095] Figure 5 The intention is to represent sub-data;
[0096] Figure 6 The intention is to divide the text into segments. Detailed Implementation
[0097] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0098] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0099] Example 1
[0100] Figure 1 This is a schematic flowchart of a method for predicting replenishment work orders based on multimodal data provided in an embodiment of the present invention. This method can be applied to, for example... Figure 2 The logistics network shown includes multiple restrooms, multiple warehouses, delivery personnel mobile apps, and a remote platform.
[0101] Each restroom is equipped with a visitor flow detection device and a temperature and humidity detection device, and a toilet paper supply device is installed at the entrance of each restroom.
[0102] The passenger flow detection device is used to detect the real-time passenger flow in the restroom and periodically send passenger flow detection data (time, passenger flow) to the remote platform according to the preset passenger flow data transmission frequency. The time format is year, month, day, hour, minute, second.
[0103] If the toilet paper currently being distributed in the restroom is in the form of individual small packs, the toilet paper supply device is used to store multiple toilet paper packs; if the toilet paper currently being distributed in the restroom is in the form of large rolls, the toilet paper supply device is used to store a single toilet paper pack.
[0104] Each toilet paper supply unit includes a weight sensor to monitor the total mass (in kg / g) of the remaining toilet paper packages within the unit, and periodically sends the remaining quantity detection data (time, remaining toilet paper quantity) to a remote platform at a preset remaining quantity data transmission frequency, with the time format being year, month, day, hour, minute, and second.
[0105] The storage room is used for bulk storage of toilet paper packaging, which includes individual small packages and large rolls.
[0106] The delivery person's mobile app receives replenishment orders from the remote platform and, according to the order, retrieves the specified type and quantity of toilet paper packaging from the designated storage room and delivers it to the designated restroom for replenishment. After retrieving the goods from the designated storage room, the delivery person sends the total warehouse outbound quantity (time, quantity of individual small packages, quantity of large rolls) to the remote platform via the mobile app. The time format is year, month, day, hour, minute, second. The unit for individual small package outbound quantity is kg / g, and the unit for large roll outbound quantity is "roll". The replenishment order is shown in Table 1:
[0107] Table 1
[0108]
[0109] Step 100: Deploy passenger flow detection devices and temperature and humidity detection devices in each restroom, and have each restroom's passenger flow detection device and temperature and humidity detection device periodically send passenger flow detection data and remaining quantity detection data to the remote platform.
[0110] Among them, see Figure 1 The remote platform periodically receives passenger flow detection data from the passenger flow detection device and remaining quantity detection data from the temperature and humidity detection device.
[0111] Each delivery driver is equipped with a mobile app. The driver receives replenishment orders via the app and prepares the goods accordingly. After picking up the goods at the designated warehouse, the driver sends the total outbound shipment count to the remote platform via the app.
[0112] Step 110: Configure a corresponding toilet data table and storage room data table for each toilet and storage room; and perform daily initialization and update of the toilet data table and the storage room data table;
[0113] The remote platform receives data tracking lists for restrooms and storage rooms. Specifically, a separate restroom data table and a storage room data table are created for each restroom and each storage room. See Table 2 for the restroom data table and Table 3 for the storage room data table.
[0114] Table 2
[0115]
[0116] Table 3
[0117]
[0118] The time scales of the two tables are aligned, and the time difference Δt between every two time scales is fixed. The unit of the time difference Δt is seconds, for example, Δt = 10 seconds.
[0119] The daily initialization mechanism for the data tracking list is as follows:
[0120] At the start of each day, based on the time difference Δt, n = 24 * 60 * 60 / Δt empty records are added to each restroom data table and each storage room data table; and based on the start time of the day (xxxx year mm month dd day 00:00:00 second), the end time of the day (xxxx year mm month dd day 23:59:59 second), and Δt, the "time scale" column of the n empty records added that day is set.
[0121] The data tracking list is updated as follows:
[0122] 1. For each restroom, the following passenger flow data (time, passenger volume) is received:
[0123] Use the current passenger flow detection data, including the time and passenger volume, as time t1 and passenger volume x1;
[0124] And set the "Passenger Flow" column of the current restroom's restroom data table as the current column;
[0125] The last non-empty field in the current column is taken as the passenger flow x0; and the time scale corresponding to the passenger flow x0 is taken as the time t0.
[0126] And based on the time difference Δt, the time interval [t0, t1] is divided equally to obtain Each point in time is an integer, and int() is the integer function; each point in time is aligned with a time scale.
[0127] Based on linear interpolation, and according to passenger flow x0 and x1, the passenger flow x at M time points in the time period [t0, t1] is calculated. m Perform the calculation; 1≤m≤M; and obtain the M passenger flow values x. m As the M passenger flow field values corresponding to the M time scales, they are sequentially filled into the current column.
[0128] 2. For each restroom, we receive data on remaining toilet paper usage (time, amount remaining):
[0129] The time of the current remaining amount detection data and the remaining amount of toilet paper are used as time t1 and remaining amount x1;
[0130] And set the "Toilet Paper Remaining" column from the current bathroom's data table as the current column;
[0131] The last non-empty field in the current column is taken as the remaining quantity x0; and the time scale corresponding to the remaining quantity x0 is taken as the time t0.
[0132] And based on the time difference Δt, the time interval [t0, t1] is divided equally to obtain There are several time points m, where 1 ≤ m ≤ M; and the remaining quantities x0 and x1 are compared:
[0133] i) If x0 < x1,
[0134] This indicates that a replenishment occurred in the middle. Therefore, for the sake of data logic correctness, it is necessary to forcibly estimate a "zero point m" among these M time points. * “m” * ≤M-1;
[0135] The estimation logic is as follows: In the current column, take the previous remaining quantity field of remaining quantity x0 as the remaining quantity x. -1 And calculate the zero-value time of the remaining amount. Then for t * Make a judgment:
[0136] If t * >t1, or t * ∈[t0, t1] but (t1-t * If ) < Δt, then the (M-1)th time point is forcibly taken as the zero point m. * =M-1;
[0137] If t * ∈[t0, t1] and (t1-t * If )≥△t, then among these M time points, the one with respect to t * The closest point in time is taken as the zero point m. * ;
[0138] Estimate the zero point m * Then: a) For 1≤m≤m * m * At each time point: Based on linear interpolation, following the uniform decreasing trend of the remaining quantity from x0 to 0, the time interval [t0, t...] is calculated. * m on ] * The remaining amount at each time point x m Perform calculations; b) For m * <m≤M of Mm * At each point in time: based on the linear interpolation method, following the uniform increasing trend of the remaining amount from 0 to x1, the time period [t] is analyzed. * Mm on t1]* The remaining amount at each time point x m Perform the calculation; it is important to emphasize that at the "zero point m" * "The remaining amount x at the corresponding time point" m It must be set to "0";
[0139] We obtain M remaining quantities x m Next: The resulting M remaining quantities x m As the values of the M remaining toilet paper quantities at the corresponding M time scales, they are sequentially filled into the current column;
[0140] ii) If x0 ≥ x1,
[0141] Based on linear interpolation, the remaining quantities x0 and x1 at M time points in the time interval [t0, t1] are calculated in a uniformly decreasing manner. m Perform the calculation; and obtain the M remaining quantities x m As the values of the M toilet paper remaining quantities at the corresponding M time scales, they are sequentially filled into the current column.
[0142] 3. Through the weather query interface, the weather parameters (temperature, humidity, precipitation) of the external environment of each restroom location are regularly collected to obtain weather data (time, temperature, humidity, precipitation);
[0143] For each restroom, the corresponding weather data (time, temperature, humidity, precipitation) is collected:
[0144] Use the current weather data, including time, temperature, humidity, and precipitation, as time t1, temperature x1, humidity y1, and precipitation z1;
[0145] And use the "Temperature", "Humidity", and "Rainfall" columns from the current bathroom data table as the first, second, and third columns, respectively;
[0146] The last non-empty field in the first column is taken as temperature x0; and the time scale corresponding to temperature x0 is taken as time. The last non-empty field in the second column is set as humidity y0; and the time scale corresponding to humidity y0 is set as time. The last non-empty field in the third column is taken as the precipitation amount z0; and the time scale corresponding to the precipitation amount y0 is taken as the time.
[0147] Based on the time difference Δt, the time period is divided into time periods. Divide equally to obtain
[0148] Based on linear interpolation, and according to temperatures x0 and x1, the time period is... Up M 1Temperature at a given moment Perform the calculation; 1≤m 1 ≤M 1 ; and the resulting M 1 Temperature As the corresponding M 1 M on a time scale 1 The temperature field values are sequentially entered into the first column;
[0149] Based on linear interpolation, and according to humidity y0 and y1, the time period is... Up M 2 Humidity at a given time point Perform the calculation; 1≤m 2 ≤M 2 ; and the resulting M 2 Humidity As the corresponding M 2 M on a time scale 2 Enter the humidity field values sequentially into the second column;
[0150] Based on linear interpolation, and according to precipitation z0 and z1, the time period is... Up M 3 Precipitation at a given time point Perform the calculation; 1≤m 3 ≤M 3 ; and the resulting M 3 Rainfall As the corresponding M 3 M on a time scale 3 Enter the precipitation data values sequentially into the third column.
[0151] 4. Through the commercial / social activity notification / promotion interface of each restroom location, set the external environment activity calendar of each restroom location to obtain the corresponding activity calendar data (activity type, activity time period). The activity type includes promotional activities and performance activities, and the activity time period is a time period parameter with the smallest unit being the hour.
[0152] For each restroom location, we receive activity calendar data (activity type, activity time period) on the external environment:
[0153] Use the activity period of the current activity calendar data as the time period T[t] s , t e ];
[0154] And set the "Active Mark" column of the current bathroom's bathroom data table as the current column;
[0155] And set the last non-empty field in the current column as the active marker x0; and set the time scale corresponding to the active marker x0 as the time t0;
[0156] And based on the time difference Δt, the time period [t0, t] is... s Divide equally to obtain The Mth time point; and the Mth time point 1 The time corresponding to each moment point is used as And based on the time difference Δt, the time period is divided into Divide equally to obtain A point in time;
[0157] And in the current column, it will be compared with the time period [t0, t s The corresponding M 1 M on a time scale 1 The activity flag field value is set to no activity, and will be associated with the time period. The corresponding M 2 M on a time scale 2 The activity tag field value is set to "Active".
[0158] 5. Total outbound volume for each warehouse (time, number of individual small packages, number of large roll packages):
[0159] For each warehouse receiving the total outbound volume, the total outbound volume includes time, the outbound volume of individual small packages, and the outbound volume of large roll packages. The time, outbound volume of individual small packages, and outbound volume of the current total outbound volume are set as time t1, small package quantity x1, and large roll quantity y1; and the individual small package storage quantity and large roll package storage quantity columns of the current warehouse data table are set as the first column and the second column, respectively.
[0160] Take the last non-empty field in the first column as the small package quantity x0; and take the time scale corresponding to the small package quantity x0 as the time. The last non-empty field in the second column is taken as the large volume y0; and the time scale corresponding to the large volume y0 is taken as the time.
[0161] Based on the time difference Δt, the time period is divided into time periods. Divide equally to obtain
[0162] The first M 1 -1 time point small package quantity Let all be x0, Mth 1 Small package volume at a given moment Let it be (x0-x1), and then the resulting M 1 Small package quantity As the corresponding M 1 M on a time scale 1The values for the storage capacity of each individual small package should be entered sequentially into the first column.
[0163] The first M 2 Large volume at -1 time point Let all be y0, Mth. 2 Large volume at a specific point in time Let it be (y0-y1), and then the resulting M 2 Large volume As the corresponding M 2 M on a time scale 2 The values of the large volume packaging storage capacity field are sequentially filled into the second column.
[0164] See Warehouse-Restroom Delivery Matrix A (see section A) Figure 3 Let a delivery matrix A be set up for all restrooms and all storage rooms. Each row of A corresponds to one storage room, and each column corresponds to one restroom. Let the total number of storage rooms be H, and the total number of restrooms be W. Then the delivery matrix A consists of H × W matrix units a. i,j Composition, where 1 ≤ column index i ≤ W, 1 ≤ row index j ≤ H. Each matrix element a i,j Let be the length (delivery distance) of the delivery path from the j-th storage room to the i-th restroom.
[0165] Step 120: Construct a toilet paper remaining quantity prediction model and periodically train the toilet paper remaining quantity prediction model by creating new model training datasets.
[0166] For the specific framework of the toilet paper remaining quantity prediction model, please refer to [link / reference needed]. Figure 4 The toilet paper remaining quantity prediction model (hereinafter referred to as prediction model M) is used to predict the duration of the current toilet paper remaining quantity being exhausted based on the input observation vector sequence X and output the corresponding prediction duration Y.
[0167] It is important to emphasize that each toilet corresponds to a prediction model M, and all prediction models M have the same model structure but different model parameters; the corresponding prediction model M needs to be trained based on the toilet data table of each toilet.
[0168] Model input:
[0169] The observation vector sequence X consists of a fixed number of K observation vectors x k The order is sequential, 1≤k≤K; each observation vector x k It consists of 6 observation data: passenger flow f k Rainfall r k Temperature p k Humidity k Activity marker g k Remaining quantity u k .
[0170] Method for obtaining the observation vector sequence X:
[0171] S1. Use the toilet data table of the specified toilet as the current data table, and use the "Toilet Paper Remaining" column of the current data table as the current column;
[0172] S2. Select the field in the current column with the closest "0" value to the current time as the field with the closest zero value;
[0173] S3. Use the time scale corresponding to the most recent zero value field as the starting time t. s Set the current time t now As the end time t e ;
[0174] S4, based on the current start time t s and end time t e Composing the most recent floating period T[t s , t e ];
[0175] S5. For the current data table, the data in the most recent floating period T[t]... s , t e The total number of time scales within the range is counted to obtain N. t ; and in the current data table, the data in the most recent floating period T[t] will be displayed. s , t e N t The extracted data records are sorted sequentially to form the corresponding first record sequence;
[0176] S6, and N t Compare with K:
[0177] S7, if N t If K ≤ K, then the passenger flow / rainfall / temperature / humidity / activity marker / toilet paper remaining fields of each data record in the first record sequence will be treated as a corresponding group. Form a corresponding observation vector Regeneration (KN) t ) zero-value vectors of length 6
[0178] S8, if N t If K > K, then based on K for the most recent floating period T[t] s , t e Perform equal-interval sampling to obtain K sampling times t. k ; and for all sampling times t k Perform one round of traversal; and during this round of traversal, record the sampling time t of the current traversal.k As of the current time t * ; and compare the time scale in the first record sequence with t * Identical data records are used as corresponding matching records; and the system identifies whether a matching record is empty; if a matching record is not empty, the fields of passenger flow / rainfall / temperature / humidity / activity markers / toilet paper remaining in the matching record are used as a set of corresponding f. k r k p k s k g k u k Form a corresponding observation vector x k If the matching record is empty, then the first record sequence containing records matching t will be... * Let t be the closest pair of consecutive times. pre t post And according to the interpolation method based on t pre t post The fields of passenger flow / rainfall / temperature / humidity / activity markers / toilet paper remaining amount are used to calculate t. * Passenger flow / rainfall / temperature / humidity / event signage / toilet paper remaining f k r k p k s k g k u k Form a corresponding observation vector x k ;
[0179] S9. From the obtained K observation vectors x k The order of these sequences forms the corresponding observation vector sequence X.
[0180] Model output:
[0181] The prediction duration Y is a relative duration, specifically referring to the current time t corresponding to the observed vector sequence X. now The length of time between the next toilet paper remaining mark of "0".
[0182] The model includes a feature splitting module, a first Bi-LSTM model + a first linear network, a second Bi-LSTM model + a second linear network, a first MLP model, a second MLP model, an attention-weighted fusion module, a feature fusion module, and a third linear network.
[0183] The feature-based traffic splitting module is used for:
[0184] The K passenger flow values f of the observed vector sequence X k The sequential sorting forms the feature sequence F{f k};
[0185] A set of precipitation r corresponding to each index k k Temperature p k Humidity k Comprising an environmental feature e k And composed of K environmental features e k The sequential sorting forms the feature sequence E{e k (r k p k s k )};
[0186] For each activity tag g k Binarization encoding conversion is performed to obtain Then, K activity codes Sequential sorting forms the feature vector
[0187] K remaining quantities u k The feature vector U{u} is formed by sequential sorting. k};
[0188] Send F, E, G, and U to the corresponding first Bi-LSTM model, second Bi-LSTM model, first MLP model, and second MLP model, respectively.
[0189] The first Bi-LSTM model plus the first linear network form an STL (Seasonal and Trend decomposition using Loess) feature decomposer (also known as an STL feature encoder) for passenger flow.
[0190] The first Bi-LSTM model plus the first linear network form an STL (Seasonal and Trend decomposition using Loess) feature decomposer (also known as an STL feature encoder) for passenger flow.
[0191] The first Bi-LSTM model is used to process the feature sequence F{f k Bidirectional feature encoding is performed to obtain the corresponding left-hand feature vector. Right-directed eigenvectors And for the left and right eigenvectors The corresponding feature vector H is obtained by concatenation. 1 Send to the first linear network. Among them, the left and right eigenvectors... The feature dimensions are all preset to D1, and the shapes are all D1×K; the feature vectors H 1 The shape is D1×2K.
[0192] The first linear network consists of two or more linear layers connected sequentially, each linear layer consisting of a fully connected layer and a ReLU function; the first linear network is used to determine the feature vector H. 1 STL feature vector prediction yields a feature vector H of shape 3×K. 5 Send the feature vector H to the attention-weighted fusion module. 5 It consists of three components The components correspond to the three feature dimensions of STL features (Seasonal S / Trend T / Residual L feature dimensions).
[0193] The second Bi-LSTM model plus the second linear network form an STL feature decomposer (also known as an STL feature encoder) for environmental features (precipitation, temperature, humidity).
[0194] The second Bi-LSTM model is used to process the feature sequence E{e k (r k p k s k Bidirectional feature encoding is performed to obtain the corresponding left-hand feature vector. Right-directed eigenvectors And for the left and right eigenvectors The corresponding feature vector H is obtained by concatenation. 2 Send to the second linear network, where the left and right eigenvectors are... The feature dimensions are all preset to D2, and the shapes are all D2×K; the feature vectors H 2 The shape is D2×2K.
[0195] The second linear network consists of two or more linear layers connected sequentially. Each linear layer is composed of a fully connected layer and a ReLU function. The second linear network is used to determine the feature vector H. 2 STL feature vector prediction yields a feature vector H of shape 3×K. 6 Send the feature vector H to the attention-weighted fusion module. 6 It consists of three components The components correspond to the three feature dimensions of STL features (Seasonal S / Trend T / Residual L feature dimensions).
[0196] The first MLP model can be viewed as an active feature encoder. The first MLP model is used to encode the active features of the feature vector G{g*k} to obtain the corresponding feature vector H. 3 Send the feature vector H to the attention-weighted fusion module. 3 The shape is 3×K.
[0197] The second MLP model can be regarded as a feature encoder for the amount of toilet paper remaining.
[0198] The second MLP model is used to process the feature vector U{u k The residual feature encoding is performed to obtain the corresponding feature vector H. 4 Send the feature vector H to the feature fusion module. 4 The shape is 3×K.
[0199] The attention-weighted fusion module is based on three weight vectors W Q W K W V For the eigenvector H 3 H 6 H 5 Perform the corresponding query, key, and value vector transformation to obtain the corresponding query vector H. Q =W Q H 3 , bond vector H K =W K H 6 Value vector H V =W V H 5 ; and based on query vector H Q , bond vector H K Value vector H V Perform attention operations and use the result as the corresponding feature vector H. 7 =Attention(H Q H K H V The feature vector H is sent to the feature fusion module. 7 The shape is 3×K.
[0200] The feature fusion module is used to process the feature vector H 4 H 7 Feature fusion is performed to obtain the feature vector H 8 =H 4 ⊙H 7 Send to the third linear network. ⊙ represents the Hadamard product. Eigenvector H 8 The shape is 3×K.
[0201] The third linear network is composed of the first and second linear layers connected sequentially. The first linear layer consists of a fully connected layer plus a ReLU function, and the second linear layer consists of a fully connected layer plus a Sigmoid function. The third linear network is used to determine the feature vector H. 8 Perform regression prediction on the time it takes for the current amount of toilet paper in the bathroom to run out, and output the corresponding predicted duration Y.
[0202] The model training process is as follows:
[0203] The training dataset is the first dataset, which includes multiple first data records; each first data record includes a training sequence X. tr and tag duration Y tag Training sequence X tr The data format is consistent with the observation vector sequence X.
[0204] The method for constructing the first dataset is as follows:
[0205] S1. Record each data record in the bathroom data table where the "Toilet Paper Remaining Amount" field is "0" as a zero-value record; and record the total number of zero-value records N. zero Perform statistics; and divide the first to the Nth... zero The contents of the table containing the zero-value records are denoted as a sub-data table; and the sub-data table is divided into N sub-tables using each zero-value record as a dividing point. zero -1 segments are created, and zero-value records in each segment are removed to obtain N. zero -1 segmented sub-table; see also Figure 5 .
[0206] S2, see also Figure 6 Each segmented sub-table is used as the current sub-table; and the total number of time scales in the current sub-table is used as the corresponding table length L. seg ; and for L seg Compare with a fixed length K; if L seg If K ≤ K, then the passenger flow / rainfall / temperature / humidity / activity marker / toilet paper remaining fields of each record in the current sub-table will be treated as a corresponding group. Form a corresponding Regeneration (KL) seg ) zero-value vectors of length 6 Then, from the obtained K observation vectors x k Form the corresponding training sequence X tr If L seg If the value is greater than K, then L will be divided according to the preset sliding partitioning mechanism. seg The data is divided into multiple sliding segments of length K, and K corresponding observation vectors x are generated based on the K records of each sliding segment. k To form a corresponding training sequence X tr ;
[0207] S3, convert each training sequence X tr This is used as the current training sequence; and the time scale corresponding to the last non-zero vector of the current training sequence is used as time t. 1 And the next zero-value time corresponding to the segment sub-table of the current training sequence is taken as the corresponding time t. 2 and t 2 -t 1 The obtained duration is used as the corresponding tag duration Y.tag ;
[0208] S4, from each training sequence X tr and its corresponding tag duration Y tag A corresponding first data record is formed; and all the obtained first data records form the first dataset.
[0209] It is important to emphasize that since each toilet corresponds to a prediction model M, it is necessary to construct a corresponding first dataset based on the toilet data table for each toilet, and train the corresponding prediction model M based on the first dataset for each toilet.
[0210] The training process is as follows:
[0211] The training sequence X of each first data record in the first dataset. tr The input prediction model M is processed to obtain the corresponding prediction duration Y, and each prediction duration Y is associated with its corresponding label duration Y. tag Form a corresponding prediction-label pair (Y, Y) tag ); and then obtain all the predicted-label pairs (Y, Y) tag Substitute the preset model loss function L M ; and based on the preset model optimizer, it moves towards making the model loss function L M The direction that reaches the minimum value optimizes the model parameters of the prediction model M. The model loss function L... M Implemented based on L1 or L2 loss functions. Model optimizers include the Adam optimizer and the SGD optimizer.
[0212] Step 130: Configure the corresponding toilet paper packaging type and set the corresponding remaining threshold u for each toilet. hold Set the corresponding maximum margin u max The weight of a single small package is recorded as m1, and the weight of a single large roll is recorded as m2.
[0213] Step 140: Use the current bathroom data table and toilet paper packaging type as the current table and current packaging type;
[0214] Step 150: Periodically record the most recently updated record in the current table as R at a preset frequency. end The record in the table where the most recent toilet paper balance is 0 is denoted as R0. The next record in the table after R0 is denoted as R. sta ; and for the current table from R sta To R end Total number of records N R Perform statistics; and R end The time scale is denoted as time t end The amount of toilet paper remaining is recorded as the surplus amount u.end ;
[0215] Step 160, for u end and u hold Perform a comparison; if u end >u hold Set duration L = 0;
[0216] Step 170, if u end ≤u hold Then for N R Compare with K; if N R If ≤K, then based on R sta ->R end N R N records generated R indivual And additionally generate (KN) R ) all zeros And from the obtained K x k Form X; if N R If the value is greater than K, then K x's will be generated based on the K most recently updated records in the current table. k Form X; and input X into the prediction model M to predict Yx, and set the duration L = Y;
[0217] Step 180: If L > 0, identify the current packaging type; if the current packaging type is an individual small package, set the replenishment quantity n. add =u max / m1, and store the most recently updated record's independent small package size greater than n. add The warehouse corresponding to the warehouse data table is recorded as the candidate warehouse; if the current packaging type is bulk roll packaging, then set the replenishment quantity n. add =u max / m2, and store the largest volume package containing the most recently updated record that is greater than n. add The warehouse corresponding to the warehouse data table is recorded as the candidate warehouse;
[0218] Step 190: If the total number of candidate storage rooms is greater than zero, select the storage room closest to the current restroom from all candidate storage rooms based on delivery matrix A as the current storage room; and select the delivery room closest to the current restroom as the target client based on the real-time location feedback from each delivery person's mobile client; and select the priority level that meets L as the replenishment priority based on the preset priority-duration correspondence; and calculate the latest replenishment time = t. end+L; and use the unique identifier of the current restroom and storage room as the restroom identifier for replenishment and the storage room identifier for pickup; set the replenishment packaging type based on the current packaging type; and send the replenishment work order composed of the obtained restroom identifier for replenishment, storage room identifier for pickup, replenishment priority, latest replenishment time, replenishment packaging type, and replenishment quantity to the target client.
[0219] The method for predicting replenishment work orders based on multimodal data provided by this invention has the following technical effects:
[0220] Real-time and accurate monitoring. By deploying passenger flow detection devices and temperature and humidity detection devices in each restroom, and regularly sending passenger flow detection data and remaining toilet paper detection data to a remote platform, the toilet paper usage and environmental conditions of each restroom can be monitored in real time and accurately, providing a reliable basis for subsequent management decisions.
[0221] Scientifically predict and replenish toilet paper levels. A model for predicting toilet paper remaining quantities in restrooms is built and regularly trained and optimized. Combined with historical data from restroom data tables, it can accurately predict the remaining amount of toilet paper and its usage duration. Based on the prediction results, replenishment time and quantity are rationally scheduled to avoid toilet paper shortages or overstocking, improving resource utilization efficiency and reducing management costs.
[0222] Intelligent warehouse matching. Based on the toilet paper packaging type and replenishment quantity, the system automatically filters out suitable candidate warehouses and selects the nearest warehouse based on the delivery matrix, ensuring timely and efficient replenishment and reducing delivery time and costs.
[0223] Optimize delivery arrangements. By obtaining real-time location feedback from delivery personnel, select the delivery person closest to the current warehouse as the target customer. At the same time, determine the replenishment priority and the latest replenishment time based on the predicted replenishment time, rationally arrange delivery tasks, improve delivery efficiency, and ensure an uninterrupted supply of toilet paper in restrooms.
[0224] Improved management efficiency. The entire system automates and intelligently manages toilet paper in restrooms, reducing manual intervention, improving the accuracy and timeliness of management, and enhancing the service quality and user satisfaction of public places.
[0225] Example 2
[0226] Embodiment 2 of the present invention provides a computer server, including: a memory, a processor, and a transceiver;
[0227] The processor is used to couple with the memory, read and execute instructions in the memory to implement any of the methods for predicting replenishment work orders based on multimodal data provided in Embodiment 1 above;
[0228] The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
[0229] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0230] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0231] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting replenishment work orders based on multimodal data, characterized in that, The method includes: Visitor flow detection devices and temperature and humidity detection devices are deployed in each restroom, and each restroom’s visitor flow detection device and temperature and humidity detection device regularly sends visitor flow detection data and remaining quantity detection data to a remote platform. Configure a corresponding toilet data table and a storage room data table for each toilet and storage room; and perform daily initialization and updates for the toilet data table and the storage room data table; Construct a toilet paper remaining quantity prediction model and periodically train the model using a new training dataset. Configure a corresponding toilet paper packaging type and set a corresponding excess threshold for each restroom. hold Set the corresponding maximum margin u max The weight of a single small package is recorded as m1, and the weight of a single large roll is recorded as m2. Set the current bathroom data table and toilet paper packaging type as the current table and current packaging type; Periodically record the most recently updated record in the current table as R at a preset frequency. end The record in the table where the most recent toilet paper balance is 0 is denoted as R0. The next record in the table after R0 is denoted as R. sta ; and for the current table from R sta To R end Total number of records N R Perform statistics; and R end The time scale is denoted as time t end The amount of toilet paper remaining is recorded as the surplus amount u. end ; For u end and u hold Perform a comparison; if u end >u hold Set duration L = 0; If u end ≤u hold Then for N R Compare with K; if N R If ≤K, then based on R sta ->R end N R N records generated R indivual And additionally generate (KN) R ) all zeros And from the obtained K x k Form X; if N R If the value is greater than K, then K x's will be generated based on the K most recently updated records in the current table. k Form X; and input X into the prediction model M to predict Yx, and set the duration L = Y; If L > 0, then identify the current packaging type; if the current packaging type is an individual small package, then set the replenishment quantity n. add =u max / m1, and store the most recently updated record's independent small package size greater than n. add The warehouse corresponding to the warehouse data table is recorded as the candidate warehouse; if the current packaging type is bulk roll packaging, then set the replenishment quantity n. add =u max / m2, and store the largest volume package containing the most recently updated record that is greater than n. add The warehouse corresponding to the warehouse data table is recorded as the candidate warehouse; If the total number of candidate storage rooms is greater than zero, then based on delivery matrix A, the storage room closest to the current restroom is selected as the current storage room; and based on the real-time location feedback from each delivery person's mobile client, the delivery person closest to the current storage room is selected as the target client; and based on the preset priority-duration correspondence, the priority level that meets L is selected as the replenishment priority; and the latest replenishment time is calculated as t. end +L; and use the unique identifier of the current restroom and storage room as the restroom identifier for replenishment and the storage room identifier for pickup; set the replenishment packaging type based on the current packaging type; and send the replenishment work order composed of the obtained restroom identifier for replenishment, storage room identifier for pickup, replenishment priority, latest replenishment time, replenishment packaging type, and replenishment quantity to the target client.
2. The method according to claim 1, characterized in that, The deployment of passenger flow detection devices and temperature and humidity detection devices in each restroom specifically includes: Each restroom is equipped with a visitor flow detection device and a temperature and humidity detection device, and a toilet paper supply device is installed at the entrance of each restroom.
3. The method according to claim 1, characterized in that, The restroom data table includes time scale, passenger flow, temperature, humidity, rainfall, activity markers, and toilet paper remaining; the storage room data table includes time scale, individual small package storage quantity, and large roll package storage quantity; the daily initialization of the restroom data table and the storage room data table specifically includes: At the start of each day, based on the time difference Δt, n = 24 * 60 * 60 / Δt empty records are added to each toilet data table and each storage room data table; and based on the start time, end time and Δt of the day, the time scale column of the n empty records added that day is set.
4. The method according to claim 1, characterized in that, The specific steps of updating the toilet data table and the storage room data table include: For each restroom receiving passenger flow detection data, the passenger flow detection data includes time and passenger flow. The time and passenger flow of the current passenger flow detection data are used as time t1 and passenger flow x1; the passenger flow column of the restroom data table of the current restroom is used as the current column; the last non-empty field in the current column is used as passenger flow x0; and the time scale corresponding to passenger flow x0 is used as time t0. Divide the time interval [t0, t1] equally based on the time difference Δt to obtain Each point in time is an integer, and int() is the integer function; each point in time is aligned with a time scale. Based on linear interpolation, and according to passenger flow x0 and x1, the passenger flow x at M time points in the time period [t0, t1] is calculated. m Perform the calculation; 1≤m≤M; obtain the M passenger flow values x m As the M passenger flow field values corresponding to the M time scales, they are sequentially filled into the current column; For each toilet's remaining quantity detection data received, the remaining quantity detection data includes time and toilet paper remaining quantity; the time and toilet paper remaining quantity of the current remaining quantity detection data are used as time t1 and remaining quantity x1; the toilet paper remaining quantity column of the toilet data table for the current toilet is used as the current column; the last non-empty field in the current column is used as the remaining quantity x0; and the time scale corresponding to the remaining quantity x0 is used as time t0; Divide the time interval [t0, t1] equally based on the time difference Δt to obtain Each time point m; Compare the remaining quantities x0 and x1. If x0 < x1, it indicates that a replenishment occurred in the middle. Forcefully estimate a zero point m among these M time points. * m * ≤M-1; where, in the current column, the remaining quantity x0 is taken from the previous remaining quantity field. -1 And calculate the zero-value time of the remaining amount. Then for t * Make a judgment if t * >t1, or t * ∈[t0, t1] but (t1-t * If ) < Δt, then the (M-1)th time point is forcibly taken as the zero point m. * =M-1; if t * ∈[t0, t1] and (t1-t * If )≥△t, then among these M time points, the one with respect to t * The closest point in time is taken as the zero point m. * ; Estimate the zero point m * Then, for 1≤m≤m * m * At each time point, based on linear interpolation, and following the uniform decreasing trend of the remaining quantity from x0 to 0, the time interval [t0, t...] is... * m on ] * The remaining amount at each time point x m Perform calculations; for m * <m≤M of Mm * At each time point, based on the linear interpolation method and the uniform increasing trend of the remaining amount from 0 to x1, the time period [t] is analyzed. * Mm on t1] * The remaining amount at each time point x m Perform calculations; We obtain M remaining quantities x m Next: The resulting M remaining quantities x m As the values of the M remaining toilet paper quantities at the corresponding M time scales, they are sequentially filled into the current column; If x0 ≥ x1, then based on linear interpolation, the remaining quantities x0 and x1 are used to calculate the remaining quantities x at M time points in the time interval [t0, t1] in a uniformly decreasing manner. m Perform the calculation; and obtain the M remaining quantities x m As the values of the M toilet paper remaining quantities at the corresponding M time scales, they are sequentially filled into the current column.
5. The method according to claim 4, characterized in that, The method further includes: Weather data is obtained by periodically collecting weather parameters of the external environment of each restroom location through a weather query interface; the weather parameters include temperature, humidity, and precipitation; the weather data includes time, temperature, humidity, and precipitation. When the weather data for each restroom is collected, the time, temperature, humidity, and precipitation of the current weather data are used as time t1, temperature x1, humidity y1, and precipitation z1. And use the temperature, humidity, and rainfall columns from the current bathroom data table as the first, second, and third columns; The last non-empty field in the first column is taken as temperature x0; and the time scale corresponding to temperature x0 is taken as time. The last non-empty field in the second column is set as humidity y0; and the time scale corresponding to humidity y0 is set as time. The last non-empty field in the third column is taken as the precipitation amount z0; and the time scale corresponding to the precipitation amount y0 is taken as the time. Based on the time difference Δt, the time period is divided into time periods. Divide equally to obtain Based on linear interpolation, and according to temperatures x0 and x1, the time period is... Up M 1 Temperature at a given moment Perform the calculation; 1≤m 1 ≤M 1 ; and the resulting M 1 Temperature As the corresponding M 1 M on a time scale 1 The temperature field values are sequentially entered into the first column; Based on linear interpolation, and according to humidity y0 and y1, the time period is... Up M 2 Humidity at a given time point Perform the calculation; 1≤m 2 ≤M 2 ; and the resulting M 2 Humidity As the corresponding M 2 M on a time scale 2 Enter the humidity field values sequentially into the second column; Based on linear interpolation, and according to precipitation z0 and z1, the time period is... Up M 3 Precipitation at a given time point Perform the calculation; 1≤m 3 ≤M 3 ; and the resulting M 3 Rainfall As the corresponding M 3 M on a time scale 3 Fill the precipitation field values sequentially into the third column; By using the commercial / social activity notification / promotion interface of each restroom location, the corresponding activity calendar data is obtained by setting the external environment activity calendar of each restroom location. The activity calendar data includes activity type and activity time period. Activity type includes promotional activities and performance activities. The activity time period is a time period parameter with the smallest unit being the hour. For each instance of receiving activity calendar data for the external environment of a restroom location, the activity period of the current activity calendar data is used as the time period T[t]. s , t e ]; Set the active marker column of the current bathroom data table as the current column; set the last non-empty field in the current column as the active marker x0; and set the time scale corresponding to the active marker x0 as the time t0; Based on the time difference Δt, the time period [t0, t] is... s Divide equally to obtain The Mth time point; and the Mth time point 1 The time corresponding to each moment point is used as And based on the time difference Δt, the time period is divided into Divide equally to obtain A point in time; In the current column, it will be compared with the time period [t0, t... s The corresponding M 1 M on a time scale 1 The activity flag field value is set to no activity, and will be associated with the time period. The corresponding M 2 M on a time scale 2 The activity flag field value is set to "Active"; For each warehouse receiving the total outbound volume, the total outbound volume includes time, the outbound volume of individual small packages, and the outbound volume of large roll packages. The time, outbound volume of individual small packages, and outbound volume of the current total outbound volume are set as time t1, small package quantity x1, and large roll quantity y1; and the individual small package storage quantity and large roll package storage quantity columns of the current warehouse data table are set as the first column and the second column, respectively. Take the last non-empty field in the first column as the small package quantity x0; and take the time scale corresponding to the small package quantity x0 as the time. The last non-empty field in the second column is taken as the large volume y0; and the time scale corresponding to the large volume y0 is taken as the time. Based on the time difference Δt, the time period is divided into time periods. Divide equally to obtain The first M 1 -1 time point small package quantity Let all be x0, Mth 1 Small package volume at a given moment Let it be (x0-x1), and then the resulting M 1 Small package quantity As the corresponding M 1 M on a time scale 1 The values for the storage capacity of each individual small package should be entered sequentially into the first column. The first M 2 Large volume at -1 time point Let all be y0, Mth. 2 Large volume at a specific point in time Let it be (y0-y1), and then the resulting M 2 Large volume As the corresponding M 2 M on a time scale 2 The values of the large volume packaging storage capacity field are sequentially filled into the second column.
6. The method according to claim 1, characterized in that, The construction of the toilet paper remaining quantity prediction model specifically includes: The observation vector sequence X consists of a fixed number of K observation vectors x k The order is sequential, 1≤k≤K; each observation vector x k It consists of 6 observation data: passenger flow f k Rainfall r k Temperature p k Humidity k Activity marker g k Remaining quantity u k ; The method for obtaining the observation vector sequence X is as follows: Use the toilet data table of the specified toilet as the current data table, and use the toilet paper remaining column of the current data table as the current column; The field in the current column with the closest 0 value to the current time is selected as the most recent zero value field. Use the time scale corresponding to the most recent zero value field as the starting time t. s Set the current time t now As the end time t e ; From the current start time t s and end time t e Composing the most recent floating period T[t s , t e ]; For the current data table, the data in the most recent floating period T[t] s , t e The total number of time scales within the range is counted to obtain N. t ; and in the current data table, the data in the most recent floating period T[t] will be displayed. s , t e N t The extracted data records are sorted sequentially to form the corresponding first record sequence; For N t Compare with K: If N t If K ≤ K, then the passenger flow / rainfall / temperature / humidity / activity marker / toilet paper remaining fields of each data record in the first record sequence will be treated as a corresponding group. Form a corresponding observation vector Regeneration (KN) t ) zero-value vectors of length 6 If N t If K > K, then based on K for the most recent floating period T[t] s , t e Perform equal-interval sampling to obtain K sampling times t. k ; and for all sampling times t k Perform one round of traversal; and during this round of traversal, record the sampling time t of the current traversal. k As of the current time t * ; and compare the time scale in the first record sequence with t * Identical data records are used as corresponding matching records; and the system identifies whether a matching record is empty; if a matching record is not empty, the fields of passenger flow / rainfall / temperature / humidity / activity markers / toilet paper remaining in the matching record are used as a set of corresponding f. k r k p k s k g k u k Form a corresponding observation vector x k If the matching record is empty, then the first record sequence containing records matching t will be... * Let t be the closest pair of consecutive times. pre t post And according to the interpolation method based on t pre t post The fields of passenger flow / rainfall / temperature / humidity / activity markers / toilet paper remaining amount are used to calculate t. * Passenger flow / rainfall / temperature / humidity / event signage / toilet paper remaining f k r k p k s k g k u k Form a corresponding observation vector x k ; From the obtained K observation vectors x k The order of these sequences forms the corresponding observation vector sequence X.
7. The method according to claim 6, characterized in that, The toilet paper remaining quantity prediction model includes a feature splitting module, a first Bi-LSTM model + a first linear network, a second Bi-LSTM model + a second linear network, a first MLP model, a second MLP model, an attention-weighted fusion module, a feature fusion module, and a third linear network. The feature-based traffic splitting module is used for: The K passenger flow values f of the observed vector sequence X k The sequential sorting forms the feature sequence F{f k }; A set of precipitation r corresponding to each index k k Temperature p k Humidity k Comprising an environmental feature e k And composed of K environmental features e k The sequential sorting forms the feature sequence E{e k (r k p k s k )}; For each activity tag g k Binarization encoding conversion is performed to obtain Then, K activity codes Sequential sorting forms the feature vector K remaining quantities u k The feature vector U{u} is formed by sequential sorting. k }; Send F, E, G, and U to the corresponding first Bi-LSTM model, second Bi-LSTM model, first MLP model, and second MLP model, respectively; The first Bi-LSTM model plus the first linear network form an STL feature decomposer for passenger flow. The first Bi-LSTM model is used to process the feature sequence F{f k Bidirectional feature encoding is performed to obtain the corresponding left-hand feature vector. Right-directed eigenvectors And for the left and right eigenvectors The corresponding feature vector H is obtained by concatenation. 1 Send to the first linear network, where the left and right eigenvectors are... The feature dimensions are all preset to D1, and the shapes are all D1×K; the feature vectors H 1 The shape is D1×2K; The first linear network consists of two or more linear layers connected sequentially, each linear layer consisting of a fully connected layer and a ReLU function; the first linear network is used to determine the feature vector H. 1 STL feature vector prediction yields a feature vector H of shape 3×K. 5 Send the feature vector H to the attention-weighted fusion module. 5 It consists of three components The components correspond to the three feature dimensions of STL features; the three feature dimensions include seasonality (S), trend (T), and residual (L) feature dimensions. The second Bi-LSTM model plus the second linear network form an STL feature decomposer for environmental features; where environmental features include precipitation, temperature, and humidity. The second Bi-LSTM model is used to process the feature sequence E{e k (r k p k s k Bidirectional feature encoding is performed to obtain the corresponding left-hand feature vector. Right-directed eigenvectors And for the left and right eigenvectors The corresponding feature vector H is obtained by concatenation. 2 Send to the second linear network, where the left and right eigenvectors are... The feature dimensions are all preset to D2, and the shapes are all D2×K; the feature vectors H 2 The shape is D2×2K; The second linear network consists of two or more linear layers connected sequentially. Each linear layer is composed of a fully connected layer and a ReLU function. The second linear network is used to determine the feature vector H. 2 STL feature vector prediction yields a feature vector H of shape 3×K. 6 Send the feature vector H to the attention-weighted fusion module. 6 It consists of three components The components correspond to the three feature dimensions of STL features; The first MLP model is used to process feature vectors. The activity feature encoding is performed to obtain the corresponding feature vector H. 3 Send the feature vector H to the attention-weighted fusion module 3 The shape is 3×K; The second MLP model is used to process the feature vector U{u k The residual feature encoding is performed to obtain the corresponding feature vector H. 4 Send the feature vector H to the feature fusion module 4 The shape is 3×K; The attention-weighted fusion module is based on three weight vectors W Q W K W V For the eigenvector H 3 H 6 H 5 Perform the corresponding query, key, and value vector transformation to obtain the corresponding query vector H. Q =W Q H 3 , bond vector H K =W K H 6 Value vector H V =W V H 5 ; and based on query vector H Q , bond vector H K Value vector H V Perform attention operations and use the result as the corresponding feature vector H. 7 =Attention(H Q H K H V Send the feature vector H to the feature fusion module. 7 The shape is 3×K; The feature fusion module is used to process the feature vector H 4 H 7 Feature fusion is performed to obtain the feature vector H 8 =H 4 ⊙H 7 Send to the third linear network; ⊙ represents the Hadamard product; eigenvector H 8 The shape is 3×K; The third linear network is composed of the first and second linear layers connected sequentially. The first linear layer consists of a fully connected layer plus a ReLU function, and the second linear layer consists of a fully connected layer plus a Sigmoid function. The third linear network is used to determine the feature vector H. 8 Perform regression prediction on the time it takes for the current amount of toilet paper in the bathroom to run out, and output the corresponding predicted duration Y.
8. The method according to claim 1, characterized in that, The regular training of the toilet paper remaining quantity prediction model by creating new model training datasets periodically includes: The first dataset includes multiple first data records; each first data record includes a training sequence X. tr and tag duration Y tag Training sequence X tr The data format is consistent with the observation vector sequence X; The method for constructing the first dataset is as follows: Record each record in the toilet paper remaining quantity field of the bathroom data table that is 0 as a zero-value record; and record the total number N of zero-value records. zero Perform statistics; and divide the first to the Nth... zero The contents of the table containing the zero-value records are denoted as a sub-data table; and the sub-data table is divided into N sub-tables using each zero-value record as a dividing point. zero -1 segments are created, and zero-value records in each segment are removed to obtain N. zero -1 segmented sub-table; Each segmented sub-table is used as the current sub-table; and the total number of time scales in the current sub-table is used as the corresponding table length L. seg ; and for L seg Compare with a fixed length K; if L seg If K ≤ K, then the passenger flow / rainfall / temperature / humidity / activity marker / toilet paper remaining fields of each record in the current sub-table will be treated as a corresponding group. Form a corresponding Regeneration (KL) seg ) zero-value vectors of length 6 Then, from the obtained K observation vectors x k Form the corresponding training sequence X tr If L seg If the value is greater than K, then L will be divided according to the preset sliding partitioning mechanism. seg The data is divided into multiple sliding segments of length K, and K corresponding observation vectors x are generated based on the K records of each sliding segment. k To form a corresponding training sequence X tr ; Each training sequence X tr This is used as the current training sequence; and the time scale corresponding to the last non-zero vector of the current training sequence is used as time t. 1 And the next zero-value time corresponding to the segment sub-table of the current training sequence is taken as the corresponding time t. 2 and t 2 -t 1 The obtained duration is used as the corresponding tag duration Y. tag ; From each training sequence X tr and its corresponding tag duration Y tag A corresponding first data record is formed; and all the obtained first data records form the first dataset.
9. The method according to claim 1, characterized in that, A corresponding delivery matrix A is set up for all restrooms and all storage rooms; each row of A corresponds to one storage room, and each column corresponds to one restroom. Let the total number of storage rooms be H, and the total number of restrooms be W. Then the delivery matrix A consists of H × W matrix units a. i,j Composition, 1 ≤ column index i ≤ W, 1 ≤ row index j ≤ H, each matrix element a i,j Let be the length of the delivery path from the j-th storage room to the i-th restroom.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is executed by a processor according to any one of claims 1-9, the method for predicting replenishment work orders based on multimodal data.
Citation Information
Patent Citations
Working method of self-moving equipment and self-moving equipment
CN115943403A
Vending device replenishment prediction method and system, and storage medium
CN119206940A
Prediction method, device and equipment for replenishment quantity of office supplies, storage medium and program product
CN119831499A
Facial tissue case capable of checking amount of remaining tissue
KR1020110047560A
Image forming system and image forming apparatus
US20060039707A1
Cited By
Processing method and device for setting traffic scheduling mark based on SDN traffic prediction
CN121984921A