Animal laboratory cage position demand prediction system and method based on Internet of Things
By utilizing IoT technology and data processing methods, an RFID-based cage demand forecasting system was constructed. This system addresses the issues of insufficient real-time and scientific data in cage management, enabling accurate forecasting of cage demand and optimized resource allocation, thereby improving laboratory management efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAZHONG UNIV OF SCI & TECH
- Filing Date
- 2026-02-09
- Publication Date
- 2026-05-15
AI Technical Summary
The existing cage management model relies on manual recording and experience assessment, resulting in insufficient data timeliness and scientific rigor. It is difficult to accurately predict animal cage demand, leading to imbalanced resource allocation and experimental delays or resource waste.
An IoT-based cage space demand forecasting system is adopted, which collects data through RFID electronic tags, performs outlier filtering, missing value imputation and variance stabilization, constructs a forecasting model that integrates attention mechanism, and performs model validation by combining AIC/BIC criteria and Ljung-BoxQ statistic to achieve highly robust forecasting.
It enables accurate prediction of cage space demand, optimizes resource allocation, improves the laboratory's space turnover efficiency and resource utilization, and provides a high-confidence basis for decision-making.
Smart Images

Figure CN122047634A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of Internet of Things technology and time series prediction technology, and particularly relates to an animal laboratory cage position demand prediction system and method based on Internet of Things. BACKGROUND
[0002] In the laboratory operation process, the optimal allocation of cage position resources directly affects the execution efficiency of scientific research projects. The existing cage position management mode mainly relies on manual paper records or electronic form entry, and combines the personal experience of management personnel to schedule resources. This mode has the following significant defects in practical application: First, the real-time and granularity of data collection are insufficient. Manual recording method not only has high labor intensity, but also has problems such as data entry lag and logical errors caused by human negligence, and it is difficult to reflect the dynamic flow state of the cage position in the time dimension in real time and accurately, so that the underlying data lacks the accuracy to support decision-making.
[0003] Second, the scientificity of the resource prediction model is lacking. The occupation of animal cages is affected by many nonlinear factors such as experimental period, parallelism of scientific research projects, and animal breeding rate, and presents a complex time evolution law. Simply relying on experience evaluation cannot quantitatively analyze the fluctuation of cage position demand, which is easy to lead to unbalanced resource allocation: on the one hand, in the peak period, the experiment may be delayed due to the slow turnover of cage positions; on the other hand, in the low peak period, the laboratory physical space and maintenance energy consumption are wasted due to the idle of resources.
[0004] Although the intervention of Internet of Things technology (such as RFID technology, Radio Frequency Identification) realizes the automatic sensing of raw data, due to the existence of sudden interference in the laboratory environment and the non-stationary distribution of data, how to deeply clean the heterogeneous collected data, build a prediction model that can adaptively fit the dynamic law, and realize high-robustness forward-looking prediction, is still a technical bottleneck that needs to be solved in the current construction of intelligent animal laboratory. SUMMARY
[0005] The purpose of the present application is to provide an animal laboratory cage position demand prediction system and method based on Internet of Things, which can capture and accurately predict the dynamic occupation law and future demand trend of experimental animal cages in real time, and provide effective protection for the optimal allocation of resources and efficient connection of scientific research tasks in the laboratory management process.
[0006] In order to achieve one of the purposes of the present application, the animal laboratory cage position demand prediction system based on Internet of Things is designed, and has the following special features: The dataset construction module is used to construct a timestamp-included cage occupancy status dataset using cage occupancy status data collected by RFID electronic tags installed on each cage. The data preprocessing module is used to sequentially perform outlier filtering, missing value imputation, and variance stabilization on the cage occupancy status dataset containing timestamps to obtain a standardized sequence of cage occupancy status. The model building module is used to perform stationarity statistical tests and iterative differencing on the standardized sequence of cage occupancy status, and dynamically determine the difference order. Through the difference order Achieving standardization and stationarization of the cage occupancy status sequence; calculating the autocorrelation function and partial autocorrelation function of the stationary cage occupancy status sequence, obtaining the truncation characteristics of the autocorrelation function and partial autocorrelation function, and combining the truncation characteristics of the autocorrelation function and partial autocorrelation function with the AIC / BIC joint criterion to determine the autoregressive order. and moving average order Based on autoregressive order and moving average order An attention mechanism is introduced to perform weight mapping on the stationary cage occupancy state sequence to obtain an attention-weighted sequence. This attention-weighted sequence and a determined difference order are then used. Autoregression order and moving average order A prediction model incorporating an attention mechanism is constructed, and the prediction model is validated using residual white noise. The prediction output module is used to perform inference calculations through the validated prediction model to obtain the predicted value of cage space demand for a set period in the future.
[0007] Furthermore, the data preprocessing module sequentially performs outlier filtering, missing value imputation, and variance stabilization on the timestamp-containing cage occupancy status dataset. Specifically, for burst noise data during the acquisition of cage occupancy status data by RFID tags, the cage occupancy status data is slid across a window of a certain size. For the cage occupancy status data within each window, the median is taken as the data value at the center of that window, resulting in the timestamp-containing cage occupancy status dataset after outlier filtering. When missing values exist in the timestamp-containing cage occupancy status dataset after outlier filtering, the outlier filtering... In the cage occupancy status dataset containing timestamps, known cage occupancy status data points are identified and interpolation nodes are established. A system of equations is constructed using interpolation conditions, continuity conditions, and boundary conditions. The coefficients of the cubic polynomial for each segmented sub-interval are then solved. A complete cubic polynomial function is constructed, and the corresponding cubic polynomial is used to estimate the missing values within the intervals containing the missing values, resulting in a cage occupancy status dataset containing timestamps after missing value imputation. Variance stabilization is then applied to the imputed cage occupancy status dataset containing timestamps to eliminate variance variability, yielding a standardized sequence of cage occupancy status.
[0008] Furthermore, the model building module performs stationarity statistical tests and iterative differencing on the standardized sequence of cage occupancy status. Specifically, it calculates the mean and standard deviation of the standardized sequence of cage occupancy status, identifies the trend or seasonal evolution characteristics of the calculated results of the mean and standard deviation, matches the Dickey-Fuller test configuration based on the identified trend or seasonal evolution characteristics, and determines the optimal lag order based on the joint criterion of AIC (Akaike Information Criterion) / BIC (Bayes Information Criterion). If the Dickey-Fuller test result is not less than the threshold, the standardized sequence of cage occupancy status is iteratively differencing and the Dickey-Fuller test is repeated until the Dickey-Fuller test result of the standardized sequence of cage occupancy status is less than the threshold, or the difference order reaches the preset maximum threshold. When the variance of the standardized sequence of cage occupancy status of the current order increases by more than a preset proportion compared with the variance of the standardized sequence of cage occupancy status of the previous order, the standard sequence of cage occupancy status of the previous order difference is used as the final stable standardized sequence of cage occupancy status, and the cumulative number of differences is determined as the difference order. .
[0009] Furthermore, the model building module calculates the autocorrelation function and partial autocorrelation function of the stationary cage occupancy state sequence. Specifically, it calculates the autocorrelation coefficient and partial autocorrelation coefficient of the stationary cage occupancy state sequence at different lag orders to analyze the linear correlation of the sequence with time shift and the strength of the direct correlation after removing the influence of intermediate lagged variables. It then obtains the truncation characteristics of the autocorrelation function and partial autocorrelation function. Specifically, it identifies the convergence state where the autocorrelation coefficient and partial autocorrelation coefficient tend to zero or enter the significance confidence interval as the lag order increases, determining the preliminary range of parameters for the autoregressive and moving average terms, thereby obtaining the truncation characteristics. Finally, it combines the truncation characteristics of the autocorrelation function and partial autocorrelation function with the AIC / BIC joint criterion, and within the preliminary range, determines the autoregressive order and moving average order through a minimum objective function search.
[0010] Furthermore, the model building module is based on the autoregressive order. and moving average order An attention mechanism is introduced to perform weight mapping on the elements of the stabilized cage occupancy state sequence, as shown in the following formula: in, This represents the autoregressive lag term; This represents the lag term in the moving average; This represents the attention weights in the autoregressive process; This represents the attention weight in the moving average process; Indicates the first Autoregressive coefficient of order; Indicates the first Moving average coefficient; Represents the constant terms of the model; This represents the perturbation term of white noise; Indicates the order of difference; Indicates the cage position occupancy state sequence in The observed value at time; Index representing the autoregressive component; The summation index represents the moving average portion, utilizing the attention weights in the autoregressive process. Attention weights in the moving average process By applying intensity gain or attenuation to feature terms with different lag orders, the model of the fusion attention mechanism can be constructed.
[0011] Furthermore, the weighted processing of the attention mechanism is specifically implemented as follows: the stabilized cage occupancy state sequence is divided into several subsequences according to a time window, and auxiliary features such as the number of experimental items and animal turnover frequency corresponding to the subsequences are extracted; the expression for the time attention factor is calculated based on the prediction baseline time as follows: ,in, Indicates the forecast base time. Indicates a point in time in historical data. Represents the attenuation coefficient; feature attention factor for learning auxiliary features through a multilayer perceptron. Normalizing the temporal attention factor and the feature attention factor, the expression for the comprehensive attention weight is obtained as follows: ; Integrate attention weights Attention weights are assigned to the autoregressive process in the prediction model. Attention weights in the moving average process By analyzing the autoregressive lag term and moving average lag term Perform a weighted mapping to generate an attention-weighted sequence.
[0012] Furthermore, the model building module validates the prediction model using residual white noise. The white noise test employs the Ljung-BoxQ statistic, as shown in the following formula: in, This represents the sample size of the residual sequence after the prediction model has been fitted. This indicates the preset maximum lag order for performing the test; Indicates the current lagging position index; Indicates the residual sequence in lag order The estimated autocorrelation coefficient at the location; When the Ljung-BoxQ statistic corresponds to The value is greater than the threshold, and the autocorrelation coefficient of the residual sequence is at the set confidence level. Furthermore, both the Ljung-BoxQ statistic and the autocorrelation coefficient of the residual sequence are centered at zero, with the boundary being... When within the confidence interval, where Given the sample size, the test is deemed passed.
[0013] Furthermore, the prediction output module performs inference calculations using the verified prediction model. Specifically, it employs a rolling time window prediction mechanism with a period not exceeding a threshold. During each inference, it slides back along the time axis based on the current time node to extract a stable cage space occupancy status sequence and features with a preset time window length. The verified prediction model is then used to output a sequence of predicted cage space demand values for the next prediction period. If the predicted value sequence contains a demand exceeding the current available cage space threshold, an early warning alarm signal is sent and a cage space allocation suggestion table is generated.
[0014] The method for predicting cage demand in animal laboratories based on the Internet of Things, designed by the present invention to achieve the second objective mentioned above, is characterized by including the following steps: A cage occupancy status dataset containing timestamps is constructed by using RFID electronic tags installed on each cage to collect cage occupancy status data. The cage occupancy status dataset containing timestamps is subjected to outlier filtering, missing value imputation, and variance stabilization processing in sequence to obtain a standardized sequence of cage occupancy status. The standardized sequence of cage occupancy status is subjected to stationarity statistical tests and iterative differencing to dynamically determine the difference order. Through the difference order Achieving standardization and stationarization of the cage occupancy status sequence; calculating the autocorrelation function and partial autocorrelation function of the stationary cage occupancy status sequence, obtaining the truncation characteristics of the autocorrelation function and partial autocorrelation function, and combining the truncation characteristics of the autocorrelation function and partial autocorrelation function with the AIC / BIC joint criterion to determine the autoregressive order. and moving average order Based on autoregressive order and moving average order An attention mechanism is introduced to perform weight mapping on the stationary cage occupancy state sequence to obtain an attention-weighted sequence. This attention-weighted sequence and a determined difference order are then used. Autoregression order and moving average order A prediction model incorporating an attention mechanism is constructed, and the prediction model is validated using residual white noise. By performing inference calculations using the validated prediction model, the predicted value of cage space demand for a future set period is obtained.
[0015] To achieve the third objective mentioned above, the present invention provides a computer program product comprising computer instructions for causing a computer to execute the aforementioned Internet of Things-based method for predicting cage demand in animal laboratories.
[0016] The present invention has the following beneficial effects: (1) The IoT-based animal laboratory cage demand prediction system and method adopts median sliding window filtering and cubic polynomial interpolation algorithm for high-fidelity data repair, ensuring the continuity and authenticity of the input sequence; through iterative difference, Dickey-Fuller test and AIC / BIC joint criterion, the dynamic optimal fit of model parameters is realized, effectively solving the common non-stationarity and variance variability problems in cage demand data; the Ljung-BoxQ statistic is used to conduct a strict white noise test on the residuals to ensure that the model has fully captured the effective information in the sequence, eliminate the spurious regression phenomenon, and provide a high-confidence decision basis for laboratory management.
[0017] (2) The IoT-based animal laboratory cage demand prediction system and method combines the time decay factor with auxiliary features such as the number of experimental projects and the frequency of animal turnover. Through the attention mechanism, the autoregressive and moving average processes are dynamically weighted and mapped, which can accurately capture the impact of the periodic fluctuations of scientific research tasks and the sudden surge in demand on cage occupancy, and significantly improve the prediction generalization ability under complex working conditions. Based on the inference mechanism of rolling time window and the early warning alarm function, the system can output a cage allocation suggestion table, shorten the response time of management personnel, and optimize the space turnover efficiency and resource allocation level of animal laboratories. Attached Figure Description
[0018] Figure 1 This diagram illustrates a module schematic of a specific embodiment of an Internet of Things-based animal laboratory cage demand prediction system according to the present invention.
[0019] Figure 2 The diagram illustrates a specific embodiment of an Internet of Things-based method for predicting cage demand in animal laboratories according to the present invention. Detailed Implementation
[0020] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0021] like Figure 1 and Figure 2 As shown in the figure, this invention discloses an animal laboratory cage space demand prediction system and method based on the Internet of Things, which can meet the needs of refined scheduling and sudden demand for cage space resources during laboratory operation.
[0022] Example 1 This embodiment discloses an Internet of Things (IoT)-based animal laboratory cage space demand prediction system, which includes: The dataset construction module is used to construct a timestamp-included cage occupancy status dataset using cage occupancy status data collected by RFID electronic tags installed on each cage. The data preprocessing module is used to sequentially perform outlier filtering, missing value imputation, and variance stabilization on the cage occupancy status dataset containing timestamps to obtain a standardized sequence of cage occupancy status. The model building module is used to perform stationarity statistical tests and iterative differencing on the standardized sequence of cage occupancy status, and dynamically determine the difference order. Through the difference order Achieving standardization and stationarization of the cage occupancy status sequence; calculating the autocorrelation function and partial autocorrelation function of the stationary cage occupancy status sequence, obtaining the truncation characteristics of the autocorrelation function and partial autocorrelation function, and combining the truncation characteristics of the autocorrelation function and partial autocorrelation function with the AIC / BIC joint criterion to determine the autoregressive order. and moving average order Based on autoregressive order and moving average order An attention mechanism is introduced to perform weight mapping on the stationary cage occupancy state sequence to obtain an attention-weighted sequence. This attention-weighted sequence and a determined difference order are then used. Autoregression order and moving average order A prediction model incorporating an attention mechanism is constructed, and the prediction model is validated using residual white noise. The prediction output module is used to perform inference calculations through the validated prediction model to obtain the predicted value of cage space demand for a set period in the future.
[0023] In this embodiment, the data preprocessing module sequentially performs outlier filtering, missing value imputation, and variance stabilization on the cage occupancy status dataset containing timestamps. Specifically, for burst noise data during the acquisition of cage occupancy status data by RFID tags, the cage occupancy status data is slid across a window of a certain size. For the cage occupancy status data within each window, the median is taken as the data value at the center of that window, resulting in the outlier-filtered cage occupancy status dataset containing timestamps. When missing values exist in the outlier-filtered cage occupancy status dataset containing timestamps, it is determined that the outlier-filtered... In a dataset containing timestamps of cage occupancy status, known cage occupancy status data points are identified and interpolation nodes are established. A system of equations is constructed using interpolation conditions, continuity conditions, and boundary conditions. The coefficients of the cubic polynomial for each segmented sub-interval are then solved. A complete cubic polynomial function is constructed, and the corresponding cubic polynomial is used to estimate the missing values within the intervals where they are located, resulting in a timestamp-included cage occupancy status dataset with imputed missing values. Variance stabilization is then applied to the timestamp-included cage occupancy status dataset to eliminate variance variability, resulting in a standardized sequence of cage occupancy status.
[0024] In this embodiment, the model building module performs stationarity statistical tests and iterative differencing on the standardized sequence of cage occupancy status. Specifically, the method involves calculating the mean and standard deviation of the standardized sequence of cage occupancy status, identifying the trend or seasonal evolution characteristics of the calculated results, matching the Dickey-Fuller test configuration based on the identified trend or seasonal evolution characteristics, determining the optimal lag order based on the AIC / BIC joint criterion, and if the Dickey-Fuller test result is not less than a threshold, then iterative differencing is performed on the standardized sequence of cage occupancy status, and the Dickey-Fuller test is repeated until the Dickey-Fuller test result of the standardized sequence of cage occupancy status is less than the threshold, or the differencing order reaches a preset maximum threshold. When the variance of the standardized sequence of cage occupancy status at the current order increases by more than a preset proportion compared to the variance of the standardized sequence of cage occupancy status at the previous order, then the process reverts to the standardized sequence of the cage occupancy status at the previous differencing order as the final stationary standardized sequence of cage occupancy status, and the cumulative number of differencing iterations is determined as the differencing order. .
[0025] Preferably, the maximum difference order The extended Dickey-Fuller test was used, and differencing was terminated when the statistic was below the 1% significance level. Over-difference was automatically detected after each differencing, and if the variance increased by more than 10%, it was reverted to the previous differencing order.
[0026] Preferably, a median filter with a window size of 5 is used. For example, the occupancy data of a cage space for 5 consecutive time points is: [1,1,0,1,1], where 0 is an outlier (possibly due to misreading by the card reader). After median filtering, it is corrected to [1,1,1,1,1].
[0027] Preferably, due to a power outage on February 15, 2024, data for cage position C25 from 9:00 to 10:00 is missing; the original record is as follows: The data at 9:00 and 9:15 were completed using cubic spline interpolation, with each value interpolated to 1 (to maintain the occupied state). Preferably, the daily cage occupancy rate data (average occupancy rate of 50 cages) is subjected to a Box-Cox transformation, and the variance before and after the transformation is compared: Preferably, the difference is performed sequentially, as follows: 0th-order difference: ADF test statistic = -1.23 (>1% critical value -3.51), non-stationary. First-order difference: ADF test statistic = -4.12 (<1% critical value -3.51), stationary. After first-order differencing, the variance of the sequence is 3.2, and after second-order differencing, the variance is 3.6 (an increase of 12.5% > 10%), which is considered excessive differencing. The final difference order is determined to be d = 1.
[0028] In this embodiment, the model building module calculates the autocorrelation function and partial autocorrelation function of the stationary cage occupancy state sequence. Specifically, it calculates the autocorrelation coefficient and partial autocorrelation coefficient of the stationary cage occupancy state sequence at different lag orders to analyze the linear correlation of the sequence with time shift and the direct correlation strength after removing the influence of intermediate lagged variables. The truncation characteristics of the autocorrelation function and partial autocorrelation function are obtained by identifying the convergence state where the autocorrelation coefficient and partial autocorrelation coefficient tend to zero or enter the significance confidence interval as the lag order increases, thus determining the preliminary range of parameters for the autoregressive and moving average terms and obtaining the truncation characteristics. The truncation characteristics of the autocorrelation function and partial autocorrelation function are combined with the AIC / BIC joint criterion, and the autoregressive order and moving average order are determined by minimizing the objective function within the preliminary range.
[0029] Preferably, the autocorrelation function (ACF) and partial autocorrelation function (PACF) are calculated for the differencing stationary sequence, and the ACF is truncated after a lag of 2. <0.2, PACF is truncated after a lag of 1 order ( <0.2, combined with AIC (Akaike Information Criterion) and BIC (Bayesian Information Criterion), the calculation results are as follows: ARIMA(1,1,2): AIC=286.3, BIC=298.7 ARIMA(2,1,1): AIC=291.5, BIC=303.9 Therefore, the ARIMA(1,1,2) model (p=1, q=2) with smaller AIC and BIC is chosen.
[0030] In this embodiment, the model building module is based on the autoregressive order. and moving average order An attention mechanism is introduced to perform weight mapping on the elements of the stabilized cage occupancy state sequence, as shown in the following formula: in, This represents the autoregressive lag term; This represents the lag term in the moving average; This represents the attention weights in the autoregressive process; This represents the attention weight in the moving average process; Indicates the first Autoregressive coefficient of order; Indicates the first Moving average coefficient; Represents the constant terms of the model; This represents the perturbation term of white noise; Indicates the order of difference; Indicates the cage position occupancy state sequence in The observed value at time; Index representing the autoregressive component; The summation index represents the moving average portion, utilizing the attention weights in the autoregressive process. Attention weights in the dynamic averaging process By applying intensity gain or attenuation to feature terms with different lag orders, the model of the fusion attention mechanism can be constructed.
[0031] Preferably, a convergence threshold is set during parameter estimation. The maximum number of iterations is ≤100.
[0032] In this embodiment, the weighted processing of the attention mechanism is specifically implemented as follows: the stabilized cage occupancy state sequence is divided into several subsequences according to a time window, and auxiliary features such as the number of experimental items and animal turnover frequency corresponding to the subsequences are extracted; the expression for the time attention factor is calculated based on the prediction baseline time: ,in, Indicates the forecast base time. Indicates a point in time in historical data. Represents the attenuation coefficient; feature attention factor for learning auxiliary features through a multilayer perceptron. Normalizing the temporal attention factor and the feature attention factor, the expression for the comprehensive attention weight is obtained as follows: ; Integrate attention weights Attention weights are assigned to the autoregressive process in the prediction model. Attention weights in the dynamic averaging process By analyzing the autoregressive lag term and moving average lag term Perform a weighted mapping to generate an attention-weighted sequence.
[0033] For example, the 90-day stationary total cage occupancy sequence is divided into 3 subsequences with 30-day windows, and auxiliary features such as the number of experimental projects and the frequency of animal entry / exit are extracted in each window. Set attenuation coefficient Calculate the time attention factor. For example, the time attention factor for the 30 days closest to the prediction baseline is 0.91, the second closest window is 0.37, and the furthest window is 0.14. Auxiliary features are learned through a multilayer perceptron, and the feature attention factor is output. The window feature attention factor in the experimental project set is 0.82, and the normal time period is 0.45. Calculate the overall attention weights, with weights of 0.62, 0.27, and 0.11 for the three windows, and then weight the original sequence to obtain the attention-weighted sequence.
[0034] Preferably, a prediction model based on a weighted sequence and a fusion attention mechanism is constructed, as shown in the following equation: in: (Autoregressive coefficients), solved by the maximum likelihood estimation method; (Moving average coefficient) satisfies the reversibility condition; It is a lag operator; Follows a mean of 0 and a variance of The white noise process; , , (Attention weights); (Residual variance); convergence after 15 iterations (<100 iterations threshold).
[0035] In this embodiment, the model building module validates the prediction model using residual white noise. The white noise test employs the Ljung-BoxQ statistic, as shown in the following formula: in, This represents the sample size of the residual sequence after the prediction model has been fitted. This indicates the preset maximum lag order for performing the test; Indicates the current lagging position index; Indicates the residual sequence in lag order The estimated autocorrelation coefficient at the location; When the Ljung-BoxQ statistic corresponds to The value is greater than the threshold, and the autocorrelation coefficient of the residual sequence is at the set confidence level. Furthermore, both the Ljung-BoxQ statistic and the autocorrelation coefficient of the residual sequence are centered at zero, with the boundary being... When within the confidence interval, where Given the sample size, the test is deemed passed.
[0036] Preferably, the constructed model is used. The model was validated, and its Ljung-BoxQ statistic (lag 12) was 15.6, the p-value was 0.21 (>0.05), and the residual ACF coefficients all fell within the interval (-2 / √90, 2 / √90) = (-0.21, 0.21). Therefore, the model was deemed to have passed the white noise test.
[0037] In this embodiment, the prediction output module performs inference calculations using the verified prediction model. Specifically, it employs a rolling time window prediction mechanism with a period not exceeding a threshold. During each inference, it slides back along the time axis based on the current time node to extract a stable cage space occupancy status sequence and features with a preset time window length. The verified prediction model is then used to output a sequence of predicted cage space demand values for the next prediction period. If the predicted value sequence contains a demand exceeding the current available cage space threshold, an early warning alarm signal is sent and a cage space allocation suggestion table is generated.
[0038] Preferably, each prediction cycle is ≤7 days; that is, each prediction uses the latest historical data as the training set, and the training data is continuously updated through a sliding window to predict the next cycle. When the predicted demand exceeds the currently available cage space, the system triggers an automatic alarm and generates a cage space allocation suggestion table to provide decision-making reference for laboratory managers so as to adjust the cage space allocation in a timely manner and ensure the smooth progress of the experiment.
[0039] Preferably, using March 25, 2024 as the forecast starting point, a rolling time window (window size = 30 days) is used to forecast the cage space demand for the next 7 days (March 26 - April 1): When the predicted demand of 42 on March 28th exceeds the available demand of 40, the system generates the following suggestion: Prioritize extending the transfer time of experimental animals in cages C03 and C15 (expected to release 2 cages). Temporarily activate backup cage positions B01 and B02 (adding 2 cage positions); It is recommended that the arrival of the new animals on March 27 be postponed to March 30.
[0040] Example 2 This embodiment discloses an Internet of Things (IoT)-based method for predicting cage space demand in animal laboratories. The method includes the following steps: Step 1: Construct a cage occupancy status dataset containing timestamps using cage occupancy status data collected by RFID electronic tags installed on each cage. Step 2: Perform outlier filtering, missing value imputation, and variance stabilization on the cage occupancy status dataset containing timestamps in sequence to obtain a standardized sequence of cage occupancy status. Step 3: Perform stationarity statistical tests and iterative differencing on the standardized sequence of cage occupancy status to dynamically determine the difference order. Through the difference order Achieving standardization and stationarization of the cage occupancy status sequence; calculating the autocorrelation function and partial autocorrelation function of the stationary cage occupancy status sequence, obtaining the truncation characteristics of the autocorrelation function and partial autocorrelation function, and combining the truncation characteristics of the autocorrelation function and partial autocorrelation function with the AIC / BIC joint criterion to determine the autoregressive order. and moving average order Based on autoregressive order and moving average order An attention mechanism is introduced to perform weight mapping on the stationary cage occupancy state sequence to obtain an attention-weighted sequence. This attention-weighted sequence and a determined difference order are then used. Autoregression order and moving average order A prediction model incorporating an attention mechanism is constructed, and the prediction model is validated using residual white noise. Step 4: Perform inference calculations using the verified prediction model to obtain the predicted cage space demand value for the future set period.
[0041] Example 3 This embodiment discloses a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the present invention through the operation of the computer. Those skilled in the art should understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instruction, or the computer compiling the instruction and then executing the corresponding compiled program, or the computer reading and executing the instruction, or the computer reading and installing the instruction and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the programs and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.
[0042] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0043] Similarly, it should be understood that, in order to streamline this disclosure and aid in understanding one or more of the various aspects of the invention, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.
Claims
1. An Internet of Things-based animal laboratory cage space demand prediction system, characterized in that, include: The dataset construction module is used to construct a timestamp-included cage occupancy status dataset using cage occupancy status data collected by RFID electronic tags installed on each cage. The data preprocessing module is used to sequentially perform outlier filtering, missing value imputation, and variance stabilization on the cage occupancy status dataset containing timestamps to obtain a standardized sequence of cage occupancy status. The model building module is used to perform stationarity statistical tests and iterative differencing on the standardized sequence of cage occupancy status, and dynamically determine the difference order. Through the difference order Achieving standardization and stationarization of the cage occupancy status sequence; calculating the autocorrelation function and partial autocorrelation function of the stationary cage occupancy status sequence, obtaining the truncation characteristics of the autocorrelation function and partial autocorrelation function, and combining the truncation characteristics of the autocorrelation function and partial autocorrelation function with the AIC / BIC joint criterion to determine the autoregressive order. and moving average order Based on autoregressive order and moving average order An attention mechanism is introduced to perform weight mapping on the stationary cage occupancy state sequence to obtain an attention-weighted sequence. This attention-weighted sequence and a determined difference order are then used. Autoregression order and moving average order A prediction model incorporating an attention mechanism is constructed, and the prediction model is validated using residual white noise. The prediction output module is used to perform inference calculations through the validated prediction model to obtain the predicted value of cage space demand for a set period in the future.
2. The animal laboratory cage demand prediction system based on the Internet of Things according to claim 1, characterized in that, The data preprocessing module sequentially performs outlier filtering, missing value imputation, and variance stabilization on the cage occupancy status dataset containing timestamps. Specifically, for burst noise data during the acquisition of cage occupancy status data by RFID tags, the cage occupancy status data is slid across a window of a certain size. For the cage occupancy status data within each window, the median is taken as the data value at the center of that window, resulting in the outlier-filtered cage occupancy status dataset containing timestamps. When missing values exist in the outlier-filtered cage occupancy status dataset containing timestamps, the outlier-filtered data containing timestamps is determined to be... In the timestamp-based cage occupancy status dataset, known cage occupancy status data points are identified and interpolation nodes are established. A system of equations is constructed using interpolation conditions, continuity conditions, and boundary conditions. The coefficients of the cubic polynomial for each segmented sub-interval are then solved. A complete cubic polynomial function is constructed, and the corresponding cubic polynomial is used to estimate the missing values within the intervals containing the missing values, resulting in a timestamp-included cage occupancy status dataset after missing value imputation. Variance stabilization is then applied to the timestamp-included cage occupancy status dataset after missing value imputation to eliminate variance variability, thus obtaining a standardized sequence of cage occupancy status.
3. The animal laboratory cage demand prediction system based on the Internet of Things according to claim 1, characterized in that, The model building module performs stationarity statistical tests and iterative differencing on the standardized sequence of cage occupancy status. Specifically, it calculates the mean and standard deviation of the standardized sequence, identifies trend or seasonal evolution characteristics of these values, matches the Dickey-Fuller test configuration based on these characteristics, determines the optimal lag order based on the AIC / BIC joint criterion, and if the Dickey-Fuller test result is not less than a threshold, iterative differencing is performed on the standardized sequence of cage occupancy status, and the Dickey-Fuller test is repeated until the Dickey-Fuller test result of the standardized sequence of cage occupancy status is less than the threshold, or the differencing order reaches a preset maximum threshold. When the variance of the standardized sequence of cage occupancy status at the current order increases by more than a preset proportion compared to the variance of the standardized sequence of cage occupancy status at the previous order, it reverts to the previous differencing standardized sequence of cage occupancy status as the final stationary standardized sequence of cage occupancy status, and the cumulative number of differencing iterations is determined as the differencing order. .
4. The animal laboratory cage demand prediction system based on the Internet of Things according to claim 1, characterized in that, The model building module calculates the autocorrelation function and partial autocorrelation function of the stationary cage occupancy status sequence. Specifically, it calculates the autocorrelation coefficient and partial autocorrelation coefficient of the stationary cage occupancy status sequence at different lag orders to analyze the linear correlation of the sequence with time shift and the strength of the direct correlation after removing the influence of intermediate lagged variables. It then obtains the truncation characteristics of the autocorrelation function and partial autocorrelation function by identifying the convergence state where the autocorrelation coefficient and partial autocorrelation coefficient tend to zero or enter the significance confidence interval as the lag order increases, thus determining the preliminary range of the parameters of the autoregressive and moving average terms and obtaining the truncation characteristics. Finally, combining the truncation characteristics of the autocorrelation function and partial autocorrelation function with the AIC / BIC joint criterion, it determines the autoregressive order and moving average order within the preliminary range by minimizing the objective function.
5. The animal laboratory cage space demand prediction system based on the Internet of Things according to claim 1, characterized in that, The model building module is based on the autoregressive order. and moving average order An attention mechanism is introduced to perform weight mapping on the elements of the stabilized cage occupancy state sequence, as shown in the following formula: in, This represents the autoregressive lag term; This represents the lag term in the moving average; This represents the attention weights in the autoregressive process; This represents the attention weight in the moving average process; Indicates the first Autoregressive coefficients; Indicates the first Moving average coefficient; Represents the constant terms of the model; This represents the perturbation term of white noise; Indicates the order of difference; Indicates the cage position occupancy state sequence in The observed value at time; Index representing the autoregressive component; The summation index represents the moving average portion, utilizing the attention weights in the autoregressive process. Attention weights in the moving average process By applying intensity gain or attenuation to feature terms with different lag orders, the model of the fusion attention mechanism can be constructed.
6. The animal laboratory cage demand prediction system based on the Internet of Things according to claim 5, characterized in that, The weighted processing of the attention mechanism is specifically as follows: the stable cage occupancy state sequence is divided into several subsequences according to the time window, and auxiliary features such as the number of experimental items and the frequency of animal turnover corresponding to the subsequence are extracted. The expression for calculating the time attention factor based on the prediction baseline time is: ,in, Indicates the forecast base time. Indicates a point in time in historical data. Represents the attenuation coefficient; feature attention factor for learning auxiliary features through a multilayer perceptron. Normalizing the temporal attention factor and the feature attention factor, the expression for the comprehensive attention weight is obtained as follows: ; Integrate attention weights Attention weights are assigned to the autoregressive process in the prediction model. Attention weights in the moving average process By analyzing the autoregressive lag term and moving average lag term Perform a weighted mapping to generate an attention-weighted sequence.
7. The animal laboratory cage space demand prediction system based on the Internet of Things according to claim 1, characterized in that, The model building module validates the prediction model using residual white noise. The white noise test employs the Ljung-BoxQ statistic, as shown in the following formula: in, This represents the sample size of the residual sequence after the prediction model has been fitted. This indicates the preset maximum lag order for performing the test; Indicates the current lagging position index; Indicates the residual sequence in lag order The estimated autocorrelation coefficient at the location; When the Ljung-BoxQ statistic corresponds to The value is greater than the threshold, and the autocorrelation coefficient of the residual sequence is at the set confidence level. Furthermore, both the Ljung-BoxQ statistic and the autocorrelation coefficient of the residual sequence are centered at zero, with the boundary being... When within the confidence interval, where Given the sample size, the test is deemed passed.
8. The animal laboratory cage demand prediction system based on the Internet of Things according to claim 1, characterized in that, The prediction output module performs inference calculations through the verified prediction model. The specific method is as follows: a rolling time window prediction mechanism with a period not greater than a threshold is adopted. Each time inference is performed, the module slides back along the time axis based on the current time node to extract the stable cage space occupancy state sequence and features of the preset time window length. The verified prediction model is then used to output the predicted value sequence of cage space demand in the next prediction period. If the demand in the predicted value sequence exceeds the current available cage space threshold, an early warning alarm signal will be sent and a cage space allocation suggestion table will be generated.
9. A method for predicting cage demand in animal laboratories based on the Internet of Things, characterized in that, Includes the following steps: A cage occupancy status dataset containing timestamps is constructed using cage occupancy status data collected by RFID electronic tags installed on each cage. The cage occupancy status dataset containing timestamps is subjected to outlier filtering, missing value imputation, and variance stabilization processing in sequence to obtain a standardized sequence of cage occupancy status. The standardized sequence of cage occupancy status is subjected to stationarity statistical tests and iterative differencing to dynamically determine the difference order. Through the difference order Achieving standardization and stationarization of the cage occupancy status sequence; calculating the autocorrelation function and partial autocorrelation function of the stationary cage occupancy status sequence, obtaining the truncation characteristics of the autocorrelation function and partial autocorrelation function, and combining the truncation characteristics of the autocorrelation function and partial autocorrelation function with the AIC / BIC joint criterion to determine the autoregressive order. and moving average order Based on autoregressive order and moving average order An attention mechanism is introduced to perform weight mapping on the stationary cage occupancy state sequence to obtain an attention-weighted sequence. This attention-weighted sequence and a determined difference order are then used. Autoregression order and moving average order A prediction model incorporating an attention mechanism is constructed, and the prediction model is validated using residual white noise. By performing inference calculations using the validated prediction model, the predicted value of cage space demand for a future set period is obtained.
10. A computer program product, characterized in that, Includes computer instructions for causing a computer to execute the Internet of Things-based animal laboratory cage demand prediction method as described in claim 9.