A raw material in warehouse safety state evaluation method and device based on environmental fluctuation

By constructing assessment segments of raw material batches and calculating environmental stress index vectors, and combining them with historical assessment segment sets to calculate risk scores, the problem of the storage status of perishable raw materials in the milk tea industry being affected by environmental fluctuations has been solved. This has enabled accurate assessment of the safety status of raw materials and determination of risk levels, optimized the allocation of inspection resources, and reduced the risk of raw material loss.

CN122390556APending Publication Date: 2026-07-14BEIJING JINHUI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING JINHUI TECH CO LTD
Filing Date
2026-05-11
Publication Date
2026-07-14

Smart Images

  • Figure CN122390556A_ABST
    Figure CN122390556A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of raw material quality control, in particular to a raw material in-stock safety state evaluation method and equipment based on environmental fluctuation, which comprises the following steps: acquiring environmental sampling data of a warehouse site environment and stock ledger records of raw material batches; constructing evaluation segments of the raw material batches according to the environmental sampling data and the stock ledger records; calculating an environmental pressure index vector based on the evaluation segments; determining a prediction probability value based on the environmental pressure index vector; acquiring a historical evaluation segment set in a historical evaluation database, and calculating a historical abnormality proportion value according to the historical evaluation segment set; performing weighted fusion calculation based on the prediction probability value and the historical abnormality proportion value to obtain a comprehensive risk score, and determining the risk grade of the raw material batches according to the comprehensive risk score. The application has the effect of reducing the loss risk of raw material quality degradation caused by environmental fluctuation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of raw material quality control technology, and in particular to a method and equipment for assessing the safety status of raw materials in storage based on environmental fluctuations. Background Technology

[0002] Currently, in the warehousing and logistics sector, especially for perishable and environmentally sensitive raw materials used in the milk tea industry, their quality is significantly affected by environmental fluctuations. To ensure the quality of raw materials, continuous monitoring of the storage environment and the condition of the raw materials is usually required.

[0003] Current raw material management methods primarily rely on manual experience for discrete inspections. After generating in-stock inspection tasks, inspectors typically verify each raw material in the warehouse according to inspection guidelines. This method struggles to quantify the quality degradation process of raw materials under varying environmental conditions, and the inspection tasks lack a risk-oriented approach, resulting in high-risk batches not being prioritized for identification. This not only wastes significant human resources but also easily leads to raw material losses or customer complaints due to delayed detection, thus indicating room for improvement. Summary of the Invention

[0004] To reduce the risk of raw material quality degradation caused by environmental fluctuations, this application provides a method and equipment for assessing the safety status of raw materials in storage based on environmental fluctuations.

[0005] The above-mentioned objective of this application is achieved through the following technical solution:

[0006] A method for assessing the safety status of raw materials in storage based on environmental fluctuations, the method comprising:

[0007] Obtain environmental sampling data of the storage location environment and inventory ledger records of raw material batches; construct an evaluation segment of the raw material batch based on the environmental sampling data and the inventory ledger records.

[0008] Based on the assessment segment, an environmental pressure index vector is calculated, which includes at least a high humidity cumulative duration index, an overheating cumulative exposure index, and a fluctuation index.

[0009] Based on the environmental pressure index vector, the predicted probability value is determined, a set of historical assessment segments is obtained from the historical assessment database, and the historical anomaly ratio is calculated based on the set of historical assessment segments.

[0010] A comprehensive risk score is obtained by weighted fusion calculation based on the predicted probability value and the historical anomaly ratio value, and the risk level of the raw material batch is determined based on the comprehensive risk score.

[0011] By adopting the above technical solutions, and by acquiring environmental sampling data of the storage location environment and inventory records of raw material batches to construct assessment segments of raw material batches, a precise spatiotemporal mapping relationship between the physical raw materials and the environmental trajectory can be established. By calculating the environmental pressure index vector, which includes the cumulative duration of high humidity, the cumulative exposure to overheating, and fluctuation indicators, unstructured environmental fluctuations can be transformed into quantified cumulative damage characteristics, thereby realizing the transformation from static threshold monitoring to dynamic dose assessment. By determining the predicted probability value and combining it with the historical assessment segment set to calculate the historical anomaly ratio value, the generalization inference ability of the algorithm can be combined with the historical empirical experience of similar materials, thereby improving the objectivity and reliability of risk assessment results. By performing weighted fusion calculation to obtain a comprehensive risk score and determine the risk level, intuitive business classification instructions can be provided to managers, thereby optimizing the allocation of inspection resources and reducing the risk of raw material loss.

[0012] In a preferred embodiment, this application can be further configured such that: constructing an evaluation fragment for the raw material batch based on the environmental sampling data and the inventory ledger records specifically includes:

[0013] Based on the environmental sampling data, an environmental time series is constructed according to the sampling time.

[0014] The storage location identifier and entry time of the raw material batch are obtained from the inventory ledger records;

[0015] Using the storage location identifier and the sampling time as the association key, the environmental time series is mapped to the corresponding raw material batch to obtain an objectified environmental trajectory;

[0016] The objectified environment trajectory is processed to obtain processed evaluation data;

[0017] Based on the current assessment time and the warehousing time, the number of days the raw material batch is in storage is calculated;

[0018] The evaluation data from the time of entry into the warehouse to the current evaluation time is extracted and combined with the number of days in the warehouse to construct the evaluation segment.

[0019] By adopting the above technical solution, the environmental time series is mapped to the corresponding raw material batch by using the storage location identifier and sampling time as the association key, and the number of days in storage is calculated by combining the storage time to extract the assessment segment. This can accurately restore the real environmental exposure history of a specific batch of raw materials during storage, thereby ensuring the uniqueness and relevance of the data source for subsequent risk assessment.

[0020] In a preferred embodiment, this application can be further configured such that: processing the objectified environment trajectory to obtain processed evaluation data specifically includes:

[0021] The objectified environment trajectory is sorted in ascending order according to the sampling time, and multiple records from the same sampling time are merged.

[0022] Determine whether the jump amplitude of adjacent sampling points in the objectified environment trajectory segment exceeds a preset threshold;

[0023] If the number of samples exceeds the limit, the corresponding sampling point is marked as an outlier and the record corresponding to the outlier is removed to obtain the evaluation data consisting of the remaining sampling points.

[0024] By adopting the above technical solutions, and by sorting and merging the objectified environmental trajectories in ascending order, and removing outliers based on jump amplitude, noise data caused by hardware failure or electromagnetic interference can be eliminated, thereby ensuring that the environmental data input into the evaluation model has physical rationality and smoothness, and preventing false alarms caused by data interference.

[0025] In a preferred embodiment, this application can be further configured such that, after obtaining the assessment data, the raw material inventory safety status assessment method further includes:

[0026] Calculate the time interval between two adjacent sampling points in the evaluation segment;

[0027] Determine whether the time interval is greater than twice the preset sampling period;

[0028] If the value is greater than the specified value, the sampling interval between the two adjacent sampling points is marked as the missing segment interval.

[0029] By adopting the above technical solution, and by calculating the time interval of sampling points and identifying the missing segment intervals, the data vacuum zone in the monitoring process can be accurately defined. This allows for proactive avoidance of uncertain periods when calculating cumulative indicators, thereby improving the system's robustness in handling data loss in industrial settings.

[0030] In a preferred embodiment, this application can be further configured such that: the calculation of the environmental pressure index vector based on the assessment fragment specifically includes:

[0031] Obtain the preset high humidity threshold and reference temperature;

[0032] The adjacent sampling points within the evaluation segment are traversed to determine multiple sampling intervals, and the difference between the midpoint humidity value and the midpoint temperature value of each sampling interval and the reference temperature is calculated respectively.

[0033] Determine whether the midpoint value of the humidity is greater than the high humidity threshold. If it is greater, determine whether the corresponding sampling interval is the missing segment interval.

[0034] If not, the sampling time of the corresponding sampling interval will be included in the valid duration;

[0035] By summing up all the aforementioned valid durations, the high humidity cumulative duration index is obtained;

[0036] Determine whether the difference is greater than zero; if it is, determine whether the corresponding sampling interval is the missing segment interval.

[0037] If not, calculate the product of the difference and the sampling time duration of the corresponding sampling interval and include it in the effective exposure amount;

[0038] The cumulative overheating exposure level is obtained by summing up all the effective exposure levels.

[0039] The total number of valid sampling points of the evaluation segment is counted, and the arithmetic mean is calculated based on the values ​​of each valid sampling point to obtain the corresponding arithmetic mean.

[0040] The fluctuation index is obtained by calculating the standard deviation based on the values ​​of each valid sampling point, the arithmetic mean, and the total number of valid sampling points. The fluctuation index includes the temperature standard deviation and the humidity standard deviation.

[0041] By adopting the above technical solution, the cumulative duration of high humidity and cumulative exposure to excessive temperature are calculated by traversing the sampling interval, and the contribution of missing intervals is actively eliminated. This enables the accurate integration and quantification of humidity-induced mold risk and temperature-induced quality degradation dose. By calculating the standard deviation based on the effective sampling point values ​​to obtain the fluctuation index, the severity of environmental fluctuations can be quantified, thereby identifying the risk of condensation or tissue damage caused by frequent temperature and humidity fluctuations.

[0042] In a preferred embodiment, this application can be further configured as follows: determining the predicted probability value based on the environmental pressure index vector, obtaining a set of historical assessment segments from the historical assessment database, and calculating the historical anomaly ratio based on the set of historical assessment segments, specifically includes:

[0043] Obtain the preset risk prediction model;

[0044] The environmental pressure index vector and the number of days in stock are input into the risk prediction model to obtain the predicted probability value;

[0045] The historical evaluation database is used to select all historical evaluation segments whose material numbers are consistent with the current raw material batch, and the historical evaluation segments whose difference between the historical inventory days and the inventory days of the current raw material batch is within the preset tolerance range are selected as candidate segments.

[0046] Obtain the historical environmental pressure index vector of each candidate fragment, and calculate the weighted Euclidean distance between the environmental pressure index vector and each historical environmental pressure index vector.

[0047] Candidate segments are selected from the candidate segments according to the preset number of segments in ascending order of the weighted Euclidean distance, and the historical evaluation segment set is constructed.

[0048] Obtain the actual quality result record corresponding to each historical evaluation segment in the historical evaluation segment set. Based on the actual quality result record, calculate the proportion of the number of segments with anomalies in the historical evaluation segment set to obtain the historical anomaly ratio value.

[0049] By adopting the above technical solution and determining the predicted probability value through the risk prediction model, it is possible to make a forward-looking judgment on the future safety status of raw materials. By calculating the weighted Euclidean distance and selecting candidate segments from the historical assessment database to construct a set, it is possible to match the most similar historical real cases to the current environmental pressure profile, thereby using historical outcomes to provide empirical support for the current risks and reducing the uncertainty of pure algorithm inference.

[0050] In a preferred embodiment, this application can be further configured as follows: the step of performing a weighted fusion calculation based on the predicted probability value and the historical anomaly ratio value to obtain a comprehensive risk score, and determining the risk level of the raw material batch based on the comprehensive risk score, specifically includes:

[0051] Based on the preset fusion weights, the predicted probability value and the historical anomaly ratio value are weighted and summed to obtain the comprehensive risk score.

[0052] If the comprehensive risk score is greater than or equal to the first risk threshold, then the risk level of the raw material batch is determined to be dangerous.

[0053] If the comprehensive risk score is less than the first risk threshold and greater than or equal to the second risk threshold, then the risk level of the raw material batch is determined to be of concern.

[0054] If the overall risk score is less than the second risk threshold, then the risk level of the raw material batch is determined to be safe.

[0055] By adopting the above technical solution, a comprehensive risk score is obtained by weighted summation based on preset fusion weights, and the risk level is determined based on multi-level risk thresholds. This can transform complex quantitative indicators into standardized management language, thereby standardizing the risk handling process and reducing the arbitrariness of human decision-making.

[0056] In a preferred embodiment, this application can be further configured such that, in the step of determining the risk level of the raw material batch, the raw material inventory safety status assessment method further includes:

[0057] Obtain the time of the first occurrence of an anomaly for each historical evaluation segment in the set of historical evaluation segments;

[0058] Calculate the time difference between the time of the first occurrence of each anomaly and the corresponding historical assessment time to obtain the corresponding remaining duration, and obtain the remaining duration sequence based on the remaining duration;

[0059] A preset quantile of the duration sequence is selected as the reference remaining storage time for the raw material batch.

[0060] By adopting the above technical solution, and using the preset quantile of the remaining duration in the historical evaluation fragment set as a reference for the remaining storage time, it is possible to provide defensive storage period prediction results for raw materials, thereby assisting managers in formulating accurate first-in-first-out (FIFO) warehousing strategies.

[0061] In a preferred embodiment, this application can be further configured such that, after obtaining the reference remaining storage time, the raw material inventory safety status assessment method further includes:

[0062] Obtain the theoretical total duration of the raw material batch from the time of entry into the warehouse to the current evaluation time, and calculate the total effective sampling time after removing the missing segment interval from the evaluation segment;

[0063] Calculate the ratio of the total effective sampling time to the theoretical total sampling time to obtain the effective sampling time percentage;

[0064] If the effective duration percentage is greater than or equal to the first percentage threshold, a safety status assessment report is generated based on the reference remaining storable time, the environmental pressure index vector, the historical anomaly ratio, and the risk level.

[0065] If the effective duration percentage is less than the first percentage threshold but greater than or equal to the second percentage threshold, the risk level is raised by one level, and a safety status assessment report is generated based on the environmental pressure index vector, the historical anomaly ratio, and the risk level.

[0066] If the percentage of effective duration is lower than the second percentage threshold, a data collection anomaly alarm and a manual intervention prompt will be triggered.

[0067] By adopting the above technical solution, the effective duration ratio is obtained by calculating the ratio of the total effective sampling time to the theoretical total time. Based on this ratio, differentiated handling logic such as generating reports, raising risk levels, or triggering alarms is executed. The evaluation strategy can be dynamically adjusted according to the completeness of data support, thereby ensuring that the evaluation conclusions of the system remain rigorous and secure in complex data environments.

[0068] The second objective of this invention is achieved through the following technical solution:

[0069] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method for assessing the safety status of raw materials in storage based on environmental fluctuations.

[0070] In summary, this application includes at least one of the following beneficial technical effects:

[0071] 1. By acquiring environmental sampling data of the storage location environment and inventory records of raw material batches, and constructing assessment segments of raw material batches, a precise spatiotemporal mapping relationship between the physical raw materials and the environmental trajectory can be established. By calculating the environmental pressure index vector, which includes the cumulative duration of high humidity, the cumulative exposure to overheating, and fluctuation indicators, unstructured environmental fluctuations can be transformed into quantified cumulative damage characteristics, thereby realizing the transformation from static threshold monitoring to dynamic dose assessment. By determining the predicted probability value and combining it with the historical assessment segment set to calculate the historical anomaly ratio value, the generalization inference ability of the algorithm can be combined with the historical empirical experience of similar materials, thereby improving the objectivity and reliability of risk assessment results. By performing weighted fusion calculation to obtain a comprehensive risk score and determine the risk level, intuitive business classification instructions can be provided to managers, thereby optimizing the allocation of inspection resources and reducing the risk of raw material loss.

[0072] 2. By calculating the ratio of the total effective sampling time to the theoretical total time, the effective time percentage is obtained. Based on this percentage, differentiated handling logic such as generating reports, raising risk levels, or triggering alarms is executed. The evaluation strategy can be dynamically adjusted according to the completeness of data support, thereby ensuring that the evaluation conclusions of the system remain rigorous and secure in complex data environments. Attached Figure Description

[0073] Figure 1 This is a flowchart illustrating the implementation of a method for assessing the safety status of raw materials in storage based on environmental fluctuations in one embodiment of this application.

[0074] Figure 2 This is a schematic diagram of the internal structure of a computer device according to an embodiment of this application. Detailed Implementation

[0075] The following embodiments will help those skilled in the art to further understand the function of this application, but do not limit this application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of this application. These all fall within the protection scope of this application.

[0076] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0077] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0078] The present application will be further described in detail below with reference to the accompanying drawings.

[0079] In one embodiment, such as Figure 1 As shown, this application discloses a method for assessing the safety status of raw materials in storage based on environmental fluctuations, specifically including the following steps:

[0080] S10. Obtain environmental sampling data of the storage location environment and inventory ledger records of raw material batches. Based on the environmental sampling data and inventory ledger records, construct an evaluation segment of the raw material batch.

[0081] Specifically, environmental sampling data is generated by collecting temperature and humidity monitoring data streams from multiple temperature and humidity sensors deployed within the storage space at preset intervals, such as f=600 seconds. Temperature values ​​are accurate to two decimal places and include a UTC timestamp conforming to ISO 8601 standards. Inventory records consist of structured JSON objects containing a unique material identifier (materialID), a batch code (lotcode), and a string representing the time of receipt. Constructing an evaluation fragment for a raw material batch involves converting the originally discrete environmental monitoring sequence S={(t1,H1,T1),...,(t... n H n ,T n By dynamically aligning the data with specific raw material batches in the spatiotemporal dimensions, a data carrier can be generated that can fully characterize the entire process of environmental fluctuations experienced by a specific raw material during its storage. For example, for a batch of fresh mango raw materials with material code MGO-001 that was stored at 10:00 on October 1, 2023, by searching its storage location number A-101, the sensor data stream corresponding to that storage location is extracted from the time of storage, thereby forming a data package that can fully characterize the environmental stress evolution process of that batch of mangoes during its storage.

[0082] S20. Based on the assessment segment, calculate the environmental pressure index vector. The environmental pressure index vector includes at least the high humidity cumulative duration index, the overheating cumulative exposure index, and the fluctuation index.

[0083] Specifically, the environmental pressure index vector is defined as a multidimensional feature vector array V=[L... H E T ,...,σ H ,σ T Each component corresponds to a numerical feature that quantifies environmental damage. This is achieved by extracting L, which represents the duration of the high-humidity environment. H E represents the total dose of heat injury. T And the standard deviation σ, which represents the stability of temperature and humidity. For example, for dry tea raw materials that are extremely sensitive to humidity, a simple momentary high humidity may not cause mold, but by calculating the cumulative duration index, the continuous high humidity pressure caused by ventilation dead spots can be identified. It can comprehensively characterize the impact of environmental fluctuations on raw materials from three dimensions: the duration of the effect of humidity on mold, the cumulative rate of temperature on quality decay, and the degree of tissue damage caused by environmental changes. For example, calculations show that a batch of raw materials has experienced a cumulative 8 hours of high temperature exposure in the past 48 hours.

[0084] S30. Based on the environmental pressure index vector, determine the predicted probability value, obtain the set of historical assessment segments from the historical assessment database, and calculate the historical anomaly ratio based on the set of historical assessment segments.

[0085] Specifically, the predicted probability value is determined by inputting the feature vector into a preset model, which outputs a floating-point number P between 0 and 1 to represent the probability of quality deterioration within the next 3 days. The historical evaluation fragment set is obtained by using a vector similarity retrieval algorithm to find the nearest neighbor samples in a database containing hundreds of thousands of historical batch records. In this way, the generalization model and empirical data can be coordinated. For example, when the model predicts that the probability of spoilage of a certain batch of mangoes is P = 0.65, the simultaneous search finds that among 10 cases that have experienced similar temperature peaks and troughs in history, 8 cases showed heart rot on the 4th day, thus obtaining a historical anomaly ratio value R of 0.8. This dual evidence method greatly improves the business credibility and fault tolerance of the evaluation conclusion.

[0086] S40. A comprehensive risk score is obtained by weighted fusion calculation based on the predicted probability value and the historical abnormality ratio value, and the risk level of the raw material batch is determined based on the comprehensive risk score.

[0087] Specifically, the weighted fusion calculation executes a linear combination formula: Score = w1 × P + w2 × R, where w1 and w2 are pre-set weighting coefficients based on the material's historical sensitivity to environmental fluctuations.1+ w2=1; The raw materials are classified according to the comprehensive risk score obtained. For example, they are divided into safe, attention and dangerous levels according to different ranges such as [0,0.3), [0.3,0.7) or [0.7,1.0]. The dangerous level will automatically trigger a red light alarm. This classification judgment logic directly guides the priority arrangement of inspection on the warehouse site and guides the arrangement of inspection tasks, realizing the transformation from indiscriminate inspection to risk-oriented intelligent monitoring.

[0088] In one embodiment, step S10, which involves constructing an evaluation segment for the raw material batch based on environmental sampling data and inventory records, specifically includes:

[0089] S11. Based on the environmental sampling data, construct the environmental time series according to the sampling time.

[0090] Specifically, constructing an environmental time series refers to collecting data with timestamps t i The raw temperature and humidity data are based on t1 <t2<...<t n The data are arranged logically in sequence to form a dynamic sequence of changes with a continuous time axis. For example, by sorting the data packets generated every 10 minutes, the fluctuation trend of the storage environment slowly rising from 20°C to 30°C within 24 hours can be clearly shown, providing an orderly data flow to support the subsequent analysis of the environmental change rate.

[0091] S12. Obtain the storage location identifier and entry time of the raw material batch from the inventory ledger records.

[0092] Specifically, obtaining the storage location identifier and entry time of a raw material batch refers to extracting the entry time node t of a specific batch of raw materials when it enters the warehouse from the background data table of the management software. in And the physical location ID assigned at that time; for example, it was found that a certain batch of tapioca pearls entered location B-05 of cold storage room No. 3 at 10:00 am yesterday.

[0093] S13. Using the storage location identifier and sampling time as the association key, map the environmental time series to the corresponding raw material batch to obtain the objectified environmental trajectory.

[0094] Specifically, obtaining the objectified environmental trajectory refers to extracting the sensor data stream deployed at the storage location using the storage location identifier, and then determining the trajectory based on t≥t. in The environmental time series is truncated under certain conditions, making it a unique lifecycle environmental flow for each raw material batch. This objectified mapping refines the macro-level warehouse environment data down to the micro-level of individual raw material batches, giving each batch a digital trajectory that reflects its actual storage environment experience and avoiding assessment errors caused by uneven temperature and humidity inside the warehouse.

[0095] S14. Process the objectified environment trajectory to obtain the processed evaluation data.

[0096] Specifically, processing the objectified environmental trajectory refers to pre-cleaning and standardizing the disordered, redundant, or abnormally abrupt values ​​that may exist in the original collected data due to sensor hardware interference. By performing quality governance actions such as deduplication and format alignment, random noise interference in the original monitoring stream can be eliminated, thereby obtaining standardized evaluation data that can truly and objectively reflect the environmental state and is convenient for subsequent integration or variance calculations.

[0097] S15. Based on the current assessment time and the warehousing time, calculate the number of days the raw material batch is in storage.

[0098] Specifically, the calculated number of days in storage for a batch of raw materials refers to the number of days calculated by Days=(t now -t in ) / 86400 yields the storage duration parameter in days; for example, if a batch of raw materials has been in storage for 259200 seconds, the storage days are calculated to be 3.0 days. This indicator not only reflects the total duration of exposure of raw materials in the current environment, but also serves as an important input parameter for model inference, used to measure the current physiological maturity or decay stage of raw materials. It is an indispensable time dimension coordinate when judging risk.

[0099] S16. Extract the evaluation data from the time of entry into the warehouse to the current evaluation time, and combine it with the number of days in the warehouse to construct an evaluation segment.

[0100] Specifically, constructing the evaluation fragment refers to dividing the time window [t] in ,t now All environmental monitoring point data within the [database name] are logically encapsulated with the current Days storage progress information to form a complete risk calculation input unit. This assessment segment, as an independent data structure, contains all the details of environmental fluctuations that the raw materials have experienced since entering the warehouse, ensuring that subsequent feature extraction steps can be calculated based on complete life cycle data, thereby improving the comprehensiveness of the assessment conclusions.

[0101] In one embodiment, step S14, which involves processing the objectified environment trajectory to obtain processed evaluation data, specifically includes:

[0102] S141. Sort the objectified environment trajectory in ascending order according to the sampling time, and merge multiple records from the same sampling time.

[0103] Specifically, merging multiple records from the same sampling time in ascending order refers to correcting the disordered recording order caused by multipath backhaul from the sensor network, and processing ti =t j Redundant readings generated at the same time are merged by averaging or taking the first value. For example, the temperature values ​​of 25.1℃ and 25.2℃ that are repeated at the same time can be merged into an average value of 25.15℃, thereby ensuring the linear uniqueness of the data sequence in the time dimension and preventing logical duplication when calculating cumulative indicators.

[0104] S142. Determine whether the jump amplitude of adjacent sampling points in the objectified environment trajectory segment exceeds the preset threshold.

[0105] Specifically, determining whether the jump amplitude exceeds a preset threshold refers to calculating the absolute difference |V| between two consecutive sampling points. i -V i-1 | This step is used to identify abnormal jumps that are not physical. For example, if the temperature jump threshold is set to 5°C, and the temperature suddenly increases from 20°C to 35°C within a ten-minute sampling interval, this phenomenon is almost impossible in a normal cold storage thermodynamic environment. However, instantaneous jumps that exceed the warehouse air conditioning regulation capacity usually indicate hardware pulse interference at the sampling point. This step can accurately identify these outlier noise points that will seriously distort the fluctuation indicators.

[0106] S143. If the number of samples exceeds the limit, the corresponding sampling points will be marked as outliers and the records corresponding to the outliers will be removed to obtain the evaluation data consisting of the remaining sampling points.

[0107] Specifically, marking outliers and removing them means physically removing the previously identified unreasonable jump data points from the calculation sequence, retaining only valid points that conform to normal physical evolution laws. This cleaning operation can prevent artificially high temperature and humidity standard deviations caused by single sensor failures, thereby ensuring that the assessment data can accurately and purely reflect the actual fluctuation level of the storage environment.

[0108] In one embodiment, after step S14, the method for assessing the safety status of raw materials in storage further includes:

[0109] S101. Calculate the time interval between two adjacent sampling points in the evaluation segment.

[0110] Specifically, the time interval Δt between two adjacent sampling points is calculated. i =t i -t i-1 This involves performing time continuity checks on the cleaned sequence; this step aims to quantify whether there are data gaps in environmental monitoring. For example, calculations may reveal that a 7200s (2h) record is missing between two data points, which provides crucial mathematical basis for subsequent assessment of data integrity and determining whether risk compensation is needed for the missing period.

[0111] S102. Determine whether the time interval is greater than twice the preset sampling period.

[0112] Specifically, determining whether the time interval is greater than 2f (1200s) is used to identify whether there is data loss or monitoring interruption over a medium to long period; for example, if the data is collected every 600s, and Δt... i If the time reaches 3600s, it means that at least 5 sampling points failed to transmit data normally. This judgment logic can automatically locate the data vacuum zone in the environmental trajectory and prevent the system from giving a blindly optimistic evaluation conclusion when the data is incomplete.

[0113] S103. If it is greater than, then mark the sampling interval between two adjacent sampling points as the missing segment interval.

[0114] Specifically, the interval marked as missing segment refers to the time period [t] where the data is incomplete. i-1 ,t i Logical annotations are applied to explicitly skip area integration or duration accumulation calculations in subsequent operations; this annotation mechanism ensures that the system calculates environmental stress based solely on real-observed data, thereby enhancing the evidentiary strength of the evaluation conclusions.

[0115] In one embodiment, step S20, which calculates the environmental pressure index vector based on the evaluation segment, specifically includes:

[0116] S21. Obtain the preset high humidity threshold and reference temperature.

[0117] Specifically, obtain the preset high humidity threshold H. th With reference temperature T ref It extracts key risk assessment benchmark values ​​from a configuration dictionary preset for different raw material sensitivity levels; for example, for tropical fruits such as mangoes, the high humidity threshold H is set... th Set to 90.0%, and set the reference temperature T. ref The temperature was set at 25.0℃. These values ​​were determined based on the biological respiration curve of the raw materials and are the key threshold for distinguishing between environmental fluctuations that are considered safe fluctuations and those that are considered pressure fluctuations.

[0118] S22. Traverse adjacent sampling points within the evaluation segment to determine multiple sampling intervals, and calculate the difference between the midpoint humidity value and the midpoint temperature value of each sampling interval and the reference temperature.

[0119] Specifically, calculate the midpoint humidity value H. mid,j =(H j +H j+1 ) / 2 and temperature difference ΔT j =(T j +T j+1 ) / 2-T refIt utilizes geometric approximation to decompose a continuous environmental curve into multiple tiny computational units. By calculating the deviation of the environmental intensity from the reference value within each micro-interval, the complex fluctuation process can be transformed into a series of quantifiable torques, providing the most basic computational unit for quantifying the cumulative dose impact of the environment on raw materials. For example, in a sampling interval lasting 10 minutes, if the initial temperature is 26℃ and the ending temperature is 28℃, then the midpoint temperature is 27℃, which is 2℃ different from the reference temperature of 25℃.

[0120] S23. Determine whether the midpoint value of humidity is greater than the high humidity threshold. If it is, determine whether the corresponding sampling interval is a missing segment interval.

[0121] Specifically, determining whether humidity exceeds the standard and whether it is a missing segment involves performing a logical AND operation. First, it identifies whether the environment is in a dangerous high-humidity state that can induce mold growth. Then, it confirms whether the data for this state comes from actual sensor observations rather than missing data. For example, if the midpoint humidity value reaches 95%, and this range is not a missing segment, then the environmental pressure in this range is considered valid for inclusion in the total damage calculation.

[0122] S24. If not, the sampling time of the corresponding sampling interval will be included in the valid duration.

[0123] Specifically, including the sampling time in the effective duration means that, after confirming the data is authentic and the humidity exceeds the standard, the small time step Δt is added to the total high humidity exposure time. This action reflects the quantitative accumulation process of continuous damage to the high humidity environment, ensuring that every real historical moment that threatens the quality of raw materials is accurately included in the feature space.

[0124] S25. Accumulate all valid durations to obtain the high humidity cumulative duration index.

[0125] Specifically, the cumulative duration of high humidity, L, was obtained. H =∑Δt valid It is calculated by summing all effective time segments that meet the high humidity conditions within the evaluation segment, and the unit is finally converted to h. This indicator can intuitively quantify the total time span during which raw materials are subjected to high humidity stress in the warehouse. If the value is displayed as 15.5h, it means that the raw materials are under high humidity pressure that is prone to mold growth for more than half a day during the warehouse, which can more accurately reflect the degree of physical environment support for mold growth.

[0126] S26. Determine if the difference is greater than zero. If it is, determine if the corresponding sampling interval is a missing segment interval.

[0127] Specifically, determine the temperature difference ΔT j>0 and whether it is a missing segment refers to identifying whether the ambient temperature exceeds the ideal storage temperature range of the material and simultaneously verifying the reliability of the data. Only when the ambient temperature is higher than the physiological reference temperature of the material and the data is recorded completely is it considered that this fluctuation has produced a calculable acceleration effect on the internal chemical changes of the raw material, thereby eliminating the interference of fluctuations in the environment within the safe cold storage range on the risk indicators.

[0128] S27. If not, calculate the product of the difference and the sampling time duration of the corresponding sampling interval and include it in the effective exposure amount.

[0129] Specifically, calculating the product and including it in the effective exposure means mimicking the injury dose model in thermodynamics, applying a ΔT ratio to the intensity and duration of the overheating. j ×(Δt j The mathematical calculation is performed, with the unit being °C·h; for example, if the midpoint temperature exceeds the reference value by 2.5 °C and lasts for 3600 seconds (1 hour), then 2.5 units of effective exposure are generated. This calculation method can uniformly measure the equivalent physical contribution of slight long-term overheating and severe short-term overheating to the degradation of raw material quality.

[0130] S28. Sum all effective exposure amounts to obtain the cumulative exposure amount index for overheating.

[0131] Specifically, the cumulative exposure to overheating, E, was obtained. T =∑(ΔT j ×Δt j This index is a summary calculation of all heat damage doses throughout the entire storage period; the higher the index, the faster the biochemical reaction rate inside the raw material is catalyzed by environmental heat energy, and the higher the degree of freshness decay. It is the core quantitative basis for predicting deep quality risks such as raw material deterioration and rotten core.

[0132] S29. Calculate the total number of valid sampling points for the statistical evaluation segment, and perform an arithmetic mean calculation based on the values ​​of each valid sampling point to obtain the corresponding arithmetic mean.

[0133] Specifically, the arithmetic mean is calculated and the arithmetic average is obtained. It characterizes the overall steady-state level of environmental fluctuations by calculating the average intensity of all effective monitoring points within the assessment segment; this average value reflects the basic background of the environment in which the raw materials are located and is the core reference benchmark for subsequent measurement of the intensity of fluctuations.

[0134] S210. Calculate the standard deviation based on the values ​​of each valid sampling point, the arithmetic mean, and the total number of valid sampling points to obtain the fluctuation index, which includes the temperature standard deviation and the humidity standard deviation.

[0135] Specifically, standard deviation calculation. It uses statistical formulas to quantify the dispersion of environmental fluctuations; for example, a temperature standard deviation as high as 3.5 means that the ambient temperature frequently fluctuates around the average value. For example, the drastic temperature fluctuations caused by frequent start-ups and shutdowns of the chiller can lead to pressure imbalances inside and outside the raw material or the generation of condensate, thereby accelerating the deterioration of quality.

[0136] In one embodiment, step S30, namely determining the predicted probability value based on the environmental pressure index vector, obtaining a set of historical assessment segments from the historical assessment database, and calculating the historical anomaly ratio based on the set of historical assessment segments, specifically includes:

[0137] S31. Obtain the preset risk prediction model.

[0138] Specifically, obtaining a preset risk prediction model refers to calling a logistic regression or neural network inference program that has been pre-trained with a large number of historical samples, which can instantly give a probabilistic judgment on future risks based on the input stress vector.

[0139] S32. Input the environmental pressure index vector and the number of days in the inventory into the risk prediction model to obtain the predicted probability value.

[0140] Specifically, obtaining the predicted probability value P means inputting the quantified environmental pressure vector and the current storage progress Days as independent variables into the model to calculate the probability of raw materials becoming abnormal within the next K days; obtaining a continuous probability value between 0 and 1, for example, a calculation result of 0.65, which means that, according to general risk laws, there is a 65% probability that the current batch of raw materials will deteriorate in quality within the next 3 days.

[0141] S33. Filter all historical evaluation segments whose material numbers match the current raw material batch from the historical evaluation database, and select historical evaluation segments whose difference between the historical inventory days and the current raw material batch inventory days is within the preset tolerance range as candidate segments.

[0142] Specifically, filtering candidate segments refers to searching for comparable historical mirrors in the historical archive, that is, identifying historical records that are of the same type as the current material and are at a similar storage progress stage; this is done by setting |Days hist -Days curr The filter uses a tolerance range of ≤1 day to ensure that subsequent similarity searches are conducted under the premise of an equivalent lifecycle, thereby eliminating the risk of misjudgment due to differences in storage duration.

[0143] S34. Obtain the historical environmental pressure index vectors of each candidate segment, and calculate the weighted Euclidean distance between the environmental pressure index vectors and each historical environmental pressure index vector.

[0144] Specifically, calculate the weighted Euclidean distance. It uses a multidimensional spatial distance formula to measure the similarity of fluctuation characteristics between two environmental segments; and assigns higher weighting coefficients w to key indicators such as the cumulative duration of high humidity. k The smaller the distance D, the closer the current environmental fluctuation characteristics are to the environmental fluctuation characteristics of a certain period in history. This allows for the accurate identification of old batches that have experienced the most similar environmental pressures in history, thus enabling the function of accurately finding historical references from massive amounts of data.

[0145] S35. Select candidate segments from the shortlisted segments according to the preset number of segments in ascending order of weighted Euclidean distance, and construct a set of historical evaluation segments.

[0146] Specifically, constructing a set of historical assessment fragments means extracting the top K historical samples that are most similar to the current situation as an empirical control group for this assessment, where K can be 30. By selecting these nearest neighboring samples, the current assessment logic can be transformed into a statistical analysis of the most similar historical experiences and their outcomes, providing evidence based on real historical facts to support risk assessment.

[0147] S36. Obtain the actual quality result records corresponding to each historical evaluation segment in the historical evaluation segment set. Based on the actual quality result records, calculate the proportion of the number of segments with abnormalities in the historical evaluation segment set to obtain the historical abnormality ratio value.

[0148] Specifically, the statistical proportion and the historical anomaly ratio R refers to verifying the actual performance of these similar historical batches after the assessment at that time; for example, if 7 out of 10 most similar historical segments eventually deteriorated and were reported as damaged, the historical anomaly ratio is 0.7. This frequency value derived from empirical experience provides valuable auxiliary evidence for risk prediction.

[0149] In one embodiment, step S40 involves a weighted fusion calculation based on the predicted probability value and the historical anomaly ratio value to obtain a comprehensive risk score, and then determining the risk level of the raw material batch based on the comprehensive risk score. Specifically, this includes:

[0150] S41. Based on the preset fusion weights, the predicted probability value and the historical anomaly ratio value are weighted and summed to obtain a comprehensive risk score.

[0151] Specifically, the weighted summation to obtain the comprehensive risk score refers to the multi-dimensional weighted fusion of P from general principles and R from empirical data of the same material. Score = w1 × P + w2 × R, where w1 and w2 are pre-set weight coefficients based on the material's historical sensitivity to environmental fluctuations, and w2 = 1 - w1. The resulting comprehensive score is a unified digital risk scale that not only reflects the general risk patterns of environmental fluctuations but also incorporates the personalized historical performance of specific materials under specific environments, thus improving the rigor of the judgment.

[0152] S42. If the comprehensive risk score is greater than or equal to the first risk threshold, the risk level of the raw material batch is determined to be dangerous.

[0153] Specifically, determining the risk level as dangerous means that when the comprehensive score reaches the high-risk warning line, such as when the score is ≥ 0.7, the logic determines that the batch of raw materials is in a dangerous state and immediately marks the batch as the highest risk level. This level determination means that the raw materials have most likely suffered irreversible environmental damage and it is necessary to immediately push emergency disposal instructions to the warehouse manager through the system interface to prevent the damaged raw materials from being mistakenly put into production.

[0154] S43. If the comprehensive risk score is less than the first risk threshold but greater than or equal to the second risk threshold, the risk level of the raw material batch is determined to be of concern.

[0155] Specifically, determining the risk level as "concern" means that when environmental stress indicators are accumulating but have not yet erupted, such as when they are between 0.3 and 0.7, the batch is marked as medium risk and placed in the yellow warning zone. This level indicates that the inspection personnel need to raise the concern level for this specific batch, and prevent potential quality deterioration through early intervention in inspections, which reflects the core advantage of proactive risk management.

[0156] S44. If the comprehensive risk score is less than the second risk threshold, the risk level of the raw material batch is determined to be safe.

[0157] Specifically, determining the risk level as safe means that when environmental fluctuations are stable and all cumulative pressure indicators are within low limits, such as when the score is less than 0.3, the batch is judged to be in a stable quality state. This provides a basis for automated unmanned inspection, greatly reduces ineffective manpower input, and enables quality control resources to be accurately allocated to high-risk targets that truly need attention.

[0158] In one embodiment, after step S40, the method for assessing the safety status of raw materials in storage further includes:

[0159] S1. Obtain the time of the first occurrence of an anomaly for each historical evaluation segment in the historical evaluation segment set.

[0160] Specifically, obtaining the time of the first occurrence of an anomaly refers to tracing back similar historical batches and extracting their exact time coordinates t from warehousing to the eventual occurrence of quality failure. fail These time-point data reveal the average survival days of raw materials under similar environmental stresses, and are key statistical samples for predicting remaining life.

[0161] S2. Calculate the time difference between the time of each first occurrence of an anomaly and the corresponding historical assessment time to obtain the corresponding remaining duration, and obtain the remaining duration sequence based on the remaining duration.

[0162] Specifically, obtaining the remaining duration sequence refers to calculating the remaining survival time of each similar historical sample after reaching the current similar environmental pressure. By calculating these relative time differences, a probability distribution sequence regarding the remaining survivable time can be obtained. This provides a reference dimension for quantifying the remaining value of the current batch.

[0163] S3. Select the preset quantile of the remaining duration sequence as the reference remaining storage time for the raw material batch.

[0164] Specifically, selecting a preset quantile and obtaining a reference remaining survival time means choosing a conservative estimate with a safety margin from the statistical distribution, such as the 25th quantile of the remaining duration sequence. This method informs managers of the estimated number of days that are available. Compared to taking an average, this method better reflects the prudent protection of food safety and quality. For example, indicating that raw materials can be stored for another 1.2 days provides warehouse managers with a highly valuable quantitative basis for FIFO (First-In, First-Out) arrangements and material allocation.

[0165] In one embodiment, after step S3, the method for assessing the safety status of raw materials in the warehouse further includes:

[0166] S4. Obtain the theoretical total duration of the raw material batch from the time of entry into the warehouse to the current evaluation time, and calculate the total effective sampling duration after removing the missing segments in the evaluation segment.

[0167] Specifically, calculating the total effective sampling time refers to using the total in-stock time T. total Subtracting all periods marked as missing data yields the net assessment coverage time T supported by real sensor data. valid This value reflects the realism of the assessment segment, that is, what percentage of the time during the entire storage period of the raw materials is under the actual monitoring of the software.

[0168] S5. Calculate the ratio of total effective sampling time to theoretical total time to obtain the effective sampling time percentage.

[0169] Specifically, obtaining the effective duration percentage refers to quantifying the reliability weight of environmental monitoring data as a percentage, i.e., η=T valid / T total The higher the percentage, the more complete the environmental trajectory and the more accurate the assessment results; conversely, a lower percentage indicates a significant lack of monitoring during the assessment process, and the conclusions may be biased.

[0170] S6. If the percentage of effective duration is greater than or equal to the first percentage threshold, a safety status assessment report is generated based on the reference remaining storable time, environmental pressure index vector, historical anomaly ratio, and risk level.

[0171] Specifically, generating a safety status assessment report means automatically outputting an authoritative assessment document that includes multi-dimensional stress analysis, risk trend charts, and accurate remaining life prediction when the data is highly complete and reliable, such as when the data accounts for more than 70%. As a core product of digital warehouse management, this report provides detailed data support for subsequent quality audits, supplier evaluations, and inventory optimization.

[0172] S7. If the percentage of effective duration is less than the first percentage threshold but greater than or equal to the second percentage threshold, the risk level will be raised by one level, and a safety status assessment report will be generated based on the environmental pressure index vector, historical anomaly ratio, and risk level.

[0173] Specifically, raising the risk level and generating a report refers to adopting a conservative defensive strategy when data has moderate gaps and the reliability of the assessment has decreased, such as when the gaps are between 30% and 70%. This involves artificially raising the warning level to offset the underestimation of risk caused by blind spots. In this mode, the remaining duration prediction is hidden to prevent misleading management decisions, and only a conservative risk assessment result is output. Although this approach still provides an assessment reference, the prominent increase in the risk level forces managers to be alert, ensuring system security in uncertain environments.

[0174] S8. If the percentage of effective duration is lower than the second percentage threshold, a data collection anomaly alarm and a manual intervention prompt will be triggered.

[0175] Specifically, triggering alarms and manual intervention commands means that when the data completeness is extremely poor and the assessment conclusion has completely lost its reference value, such as when the proportion is less than 30%, the logic is blocked and the manual emergency control mode is forcibly switched. By pushing hardware failure repair requests or manual quality inspection and verification tasks to the terminal in real time, the risk of quality loss due to environmental monitoring vacuum is effectively prevented, and the fault self-healing and safety closed loop of the entire assessment system in harsh data environment is ensured.

[0176] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0177] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 2 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores data such as environmental sampling data, inventory records, assessment segments, and environmental stress index vectors. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a method for assessing the safety status of raw materials in inventory based on environmental fluctuations.

[0178] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0179] Obtain environmental sampling data of the storage location environment and inventory records of raw material batches. Based on the environmental sampling data and inventory records, construct an evaluation segment of the raw material batch.

[0180] Based on the assessment fragment, an environmental pressure index vector is calculated. The environmental pressure index vector includes at least the high humidity cumulative duration index, the overheat cumulative exposure index, and the fluctuation index.

[0181] Based on the environmental pressure index vector, the predicted probability value is determined, the set of historical assessment segments is obtained from the historical assessment database, and the historical anomaly ratio is calculated based on the set of historical assessment segments.

[0182] A comprehensive risk score is obtained by weighted fusion calculation based on predicted probability values ​​and historical anomaly ratio values, and the risk level of raw material batches is determined based on the comprehensive risk score.

[0183] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0184] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0185] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for assessing the safety status of raw materials in storage based on environmental fluctuations, characterized in that, The method for assessing the safety status of raw materials in storage includes: Obtain environmental sampling data of the storage location environment and inventory ledger records of raw material batches; construct an evaluation segment of the raw material batch based on the environmental sampling data and the inventory ledger records. Based on the assessment segment, an environmental pressure index vector is calculated, which includes at least a high humidity cumulative duration index, an overheating cumulative exposure index, and a fluctuation index. Based on the environmental pressure index vector, the predicted probability value is determined, a set of historical assessment segments is obtained from the historical assessment database, and the historical anomaly ratio is calculated based on the set of historical assessment segments. A comprehensive risk score is obtained by weighted fusion calculation based on the predicted probability value and the historical anomaly ratio value, and the risk level of the raw material batch is determined based on the comprehensive risk score.

2. The method for assessing the safety status of raw materials in storage according to claim 1, characterized in that, The step of constructing an evaluation segment for the raw material batch based on the environmental sampling data and the inventory ledger records specifically includes: Based on the environmental sampling data, an environmental time series is constructed according to the sampling time. The storage location identifier and entry time of the raw material batch are obtained from the inventory ledger records; Using the storage location identifier and the sampling time as the association key, the environmental time series is mapped to the corresponding raw material batch to obtain an objectified environmental trajectory; The objectified environment trajectory is processed to obtain processed evaluation data; Based on the current assessment time and the warehousing time, the number of days the raw material batch is in storage is calculated; The evaluation data from the time of entry into the warehouse to the current evaluation time is extracted and combined with the number of days in the warehouse to construct the evaluation segment.

3. The method for assessing the safety status of raw materials in storage according to claim 2, characterized in that, The process of processing the objectified environment trajectory to obtain processed evaluation data specifically includes: The objectified environment trajectory is sorted in ascending order according to the sampling time, and multiple records from the same sampling time are merged. Determine whether the jump amplitude of adjacent sampling points in the objectified environment trajectory segment exceeds a preset threshold; If the number of samples exceeds the limit, the corresponding sampling point is marked as an outlier and the record corresponding to the outlier is removed to obtain the evaluation data consisting of the remaining sampling points.

4. The method for assessing the safety status of raw materials in storage according to claim 1, characterized in that, After obtaining the assessment data, the raw material inventory safety status assessment method further includes: Calculate the time interval between two adjacent sampling points in the evaluation segment; Determine whether the time interval is greater than twice the preset sampling period; If the value is greater than the specified value, the sampling interval between the two adjacent sampling points is marked as the missing segment interval.

5. The method for assessing the safety status of raw materials in storage according to claim 4, characterized in that, The calculation of the environmental pressure index vector based on the assessment segment specifically includes: Obtain the preset high humidity threshold and reference temperature; The adjacent sampling points within the evaluation segment are traversed to determine multiple sampling intervals, and the difference between the midpoint humidity value and the midpoint temperature value of each sampling interval and the reference temperature is calculated respectively. Determine whether the midpoint value of the humidity is greater than the high humidity threshold. If it is greater, determine whether the corresponding sampling interval is the missing segment interval. If not, the sampling time of the corresponding sampling interval will be included in the valid duration; By summing up all the aforementioned valid durations, the high humidity cumulative duration index is obtained; Determine whether the difference is greater than zero; if it is, determine whether the corresponding sampling interval is the missing segment interval. If not, calculate the product of the difference and the sampling time duration of the corresponding sampling interval and include it in the effective exposure amount; The cumulative overheating exposure level is obtained by summing up all the effective exposure levels. The total number of valid sampling points of the evaluation segment is counted, and the arithmetic mean is calculated based on the values ​​of each valid sampling point to obtain the corresponding arithmetic mean. The fluctuation index is obtained by calculating the standard deviation based on the values ​​of each valid sampling point, the arithmetic mean, and the total number of valid sampling points. The fluctuation index includes the temperature standard deviation and the humidity standard deviation.

6. The method for assessing the safety status of raw materials in storage according to claim 2, characterized in that, The process of determining the predicted probability value based on the environmental pressure index vector, obtaining a set of historical assessment segments from the historical assessment database, and calculating the historical anomaly ratio based on the set of historical assessment segments specifically includes: Obtain the preset risk prediction model; The environmental pressure index vector and the number of days in stock are input into the risk prediction model to obtain the predicted probability value; The historical evaluation database is used to select all historical evaluation segments whose material numbers are consistent with the current raw material batch, and the historical evaluation segments whose difference between the historical inventory days and the inventory days of the current raw material batch is within the preset tolerance range are selected as candidate segments. Obtain the historical environmental pressure index vector of each candidate fragment, and calculate the weighted Euclidean distance between the environmental pressure index vector and each historical environmental pressure index vector. Candidate segments are selected from the candidate segments according to the preset number of segments in ascending order of the weighted Euclidean distance, and the historical evaluation segment set is constructed. Obtain the actual quality result record corresponding to each historical evaluation segment in the historical evaluation segment set. Based on the actual quality result record, calculate the proportion of the number of segments with anomalies in the historical evaluation segment set to obtain the historical anomaly ratio value.

7. The method for assessing the safety status of raw materials in storage according to claim 1, characterized in that, The step of performing a weighted fusion calculation based on the predicted probability value and the historical anomaly ratio value to obtain a comprehensive risk score, and determining the risk level of the raw material batch based on the comprehensive risk score, specifically includes: Based on the preset fusion weights, the predicted probability value and the historical anomaly ratio value are weighted and summed to obtain the comprehensive risk score. If the comprehensive risk score is greater than or equal to the first risk threshold, then the risk level of the raw material batch is determined to be dangerous. If the comprehensive risk score is less than the first risk threshold and greater than or equal to the second risk threshold, then the risk level of the raw material batch is determined to be of concern. If the overall risk score is less than the second risk threshold, then the risk level of the raw material batch is determined to be safe.

8. The method for assessing the safety status of raw materials in storage according to claim 6, characterized in that, In the step of determining the risk level of the raw material batch, the method for assessing the safety status of raw materials in storage further includes: Obtain the time of the first occurrence of an anomaly for each historical evaluation segment in the set of historical evaluation segments; Calculate the time difference between the time of the first occurrence of each anomaly and the corresponding historical assessment time to obtain the corresponding remaining duration, and obtain the remaining duration sequence based on the remaining duration; A preset quantile of the remaining duration sequence is selected as the reference remaining storage time for the raw material batch.

9. The method for assessing the safety status of raw materials in storage according to claim 4 or 6, characterized in that, After obtaining the reference remaining storage time, the raw material inventory safety status assessment method further includes: Obtain the theoretical total duration of the raw material batch from the time of entry into the warehouse to the current evaluation time, and calculate the total effective sampling time after removing the missing segment interval from the evaluation segment; Calculate the ratio of the total effective sampling time to the theoretical total sampling time to obtain the effective sampling time percentage; If the effective duration percentage is greater than or equal to the first percentage threshold, a safety status assessment report is generated based on the reference remaining storable time, the environmental pressure index vector, the historical anomaly ratio, and the risk level. If the effective duration percentage is less than the first percentage threshold but greater than or equal to the second percentage threshold, the risk level is raised by one level, and a safety status assessment report is generated based on the environmental pressure index vector, the historical anomaly ratio, and the risk level. If the percentage of effective duration is lower than the second percentage threshold, a data collection anomaly alarm and a manual intervention prompt will be triggered.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the raw material inventory safety status assessment method based on environmental fluctuations as described in any one of claims 1 to 9.