A fermentation tail gas component data self-learning online prediction method
By constructing a alignment comparison and segmental consistency verification between the current exhaust gas sequence and the historical reference sequence, the problem of lagging exhaust gas component data prediction in the existing technology is solved, and accurate real-time prediction of fermentation exhaust gas component data is realized, thereby improving the model's adaptive capability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 汉中天然谷生物科技股份有限公司
- Filing Date
- 2026-04-28
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies for self-learning online prediction of fermentation exhaust gas components struggle to capture the true online evolution patterns of exhaust gas components in a timely manner, resulting in model recognition lag, delayed identification of key changes, and easy masking of abnormal signals, making it difficult to meet the requirements of real-time performance and targeted application.
By constructing a positional comparison between the current exhaust gas sequence and the historical reference sequence, candidate segments of change are formed. The historical sequence regression amount and historical envelope escape residence amount are calculated. The inherited feature set and the new change feature set are divided, and segmented consistency verification is performed to realize the self-learning online prediction and controlled update of fermentation exhaust gas component data.
It enables accurate and real-time prediction of fermentation exhaust gas composition data, ensuring that new changes can be incorporated into the model in a timely manner, avoiding the dilution of historical experience, and improving the real-time nature and relevance of predictions.
Smart Images

Figure CN122117120A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bio-fermentation information processing, and more specifically, to a self-learning online prediction method for fermentation exhaust gas composition data. Background Technology
[0002] In fermentation production, the composition of exhaust gas can continuously characterize the metabolic state of microorganisms, substrate utilization, and process fluctuation trends. Therefore, using exhaust gas composition data for online prediction has become an important technical direction for improving process perception and auxiliary control. Existing material, "A Dynamic Prediction Method for Fermentation Process Product Concentration Based on Incremental Learning" (Publication No.: CN117953994A), discloses a dynamic prediction scheme for fermentation process product concentration. This scheme first trains a historical model using historical batch samples, then performs feature dimensionality reduction, similar sample retrieval, sample filling, and incremental updates on new samples and historical samples to alleviate model aging caused by batch differences and improve the model's adaptive prediction capability. This scheme demonstrates that existing technologies have addressed the prediction instability caused by batch variations in fermentation process data and attempt to maintain the model's continuous usability by leveraging historical experience and incremental learning mechanisms.
[0003] However, existing technologies still have significant shortcomings in the application scenario of online prediction of fermentation exhaust gas components using self-learning. This is because changes in exhaust gas components are characterized by strong continuity, rapid response, significant stages, and the appearance of abnormal signs before effective label feedback. The current technical approach, relying primarily on historical similar samples to supplement new samples, updates the model only after the new samples have accumulated. Consequently, when new batches of exhaust gas exhibit significant process-indicative changes, the system often interprets the current data using historical distributions, diluting and dragging down the truly new features reflecting the current state. Furthermore, due to the lag in model updates, these new changes are difficult to incorporate into the model and form effective learning in a timely manner. As a result, while the model appears to continuously update adaptively, it is more prone to repeating historical experiences, making it difficult to capture the true online evolution patterns of exhaust gas components. This leads to delayed identification of key changes, the easy masking of abnormal signals, and an inability to meet the requirements of real-time performance, relevance, and accuracy in online prediction of fermentation exhaust gas components.
[0004] To address the aforementioned problems, a technical solution is provided. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a self-learning online prediction method for fermentation exhaust gas component data. This method constructs a current exhaust gas sequence from continuously collected multi-component fermentation exhaust gas data and compares it with a historical reference sequence to form candidate segments of change. It further calculates the historical sequence regression amount and historical envelope escape retention amount, divides the inherited feature set and the new change feature set, and then generates continuous prediction segments and local prediction segments respectively. Finally, it combines confirmed samples to perform segmented consistency verification and writes the data into the historical reference sequence, thereby achieving self-learning online prediction and controlled updating of fermentation exhaust gas component data to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: S1. Write the continuously collected multi-component data of fermentation tail gas into the current tail gas sequence according to the sampling time sequence, and establish a corresponding comparison sequence based on the historical reference sequence. Use a continuous analysis window to extract the combination of the change direction of each tail gas component relative to the previous continuous analysis window. After comparing window by window, merge the continuous analysis windows that do not meet the consistency relationship into change candidate segments. S2. Extract the corresponding historical aligned segments for the candidate segments of change, and divide the analysis window separately. Generate the component sequence string according to the component proportion, calculate the historical sequence regression amount and the historical envelope escape residence amount, input the two into the staged mirror dual-domain learning model to obtain the new change retention coefficient, and divide the candidate segments of change into new change feature segments or regression segments according to the new change retention coefficient to form the inherited feature set and the new change feature set. S3. Divide the inherited feature set into inherited segments according to the original position in the current exhaust gas sequence, and perform historical prediction mapping based on the historical reference sequence to obtain the continued prediction segment. Then, divide the new variable feature set into new variable segments according to the original position, and perform local prediction mapping based on the connecting transition data and the connection end of the adjacent continued prediction segment to obtain the local prediction segment. Then, backfill according to the original position to form the segmented prediction result. S4. After obtaining the confirmed samples corresponding to the segmented prediction results, the segments are synchronously divided according to the segment boundaries in the segmented prediction results to obtain confirmed continuation segments and confirmed new change segments. The segmented consistency verification is performed on the local prediction segments and the corresponding confirmed new change segments. The new change feature segments that pass the verification are written into the historical reference sequence, and the new change feature segments that fail the verification are transferred to the isolation samples.
[0007] Furthermore, the current exhaust gas sequence and the historical reference sequence are first rearranged according to the same exhaust gas component order and the same sampling interval. Then, a historical alignment number is established based on the cumulative change path between adjacent sampling positions of each exhaust gas component after reference amplitude normalization. The corresponding sampling value is then extracted from the historical reference sequence according to the historical alignment number to form a comparison sequence.
[0008] Furthermore, a continuous analysis window is set along the current exhaust gas sequence, and the direction ratio of each exhaust gas component in the current exhaust gas sequence and the comparison sequence in two adjacent continuous analysis windows is calculated respectively. Then, the change direction value is generated according to the direction resolution threshold. The inconsistent window is determined by the consistency ratio of the change direction values of each exhaust gas component, and the inconsistent windows with an interval not exceeding the connection threshold are merged to form change candidate segments.
[0009] Furthermore, for each candidate segment of change, historical aligned segments, left transition data, and right transition data are extracted respectively. The proportion of each exhaust gas component in the corresponding analysis window is calculated according to the same analysis window boundary. Then, the component sequence strings of the candidate segment of change, historical aligned segment, left transition analysis window, and right transition analysis window are generated according to the size of the component proportion.
[0010] Furthermore, the transition inversion pair set is first extracted from the left and right transition analysis windows. Then, the component sequence string of the change candidate fragment analysis window is compared with the component sequence string of the corresponding historical aligned fragment analysis window to obtain the window inversion pair set. The historical sequence regression amount is determined by the proportion of the analysis window included in the transition inversion pair set. The historical containment envelope is established by the historical aligned fragment and transition data to determine the historical envelope escape and residence amount.
[0011] Furthermore, the fermentation stage to which the candidate change fragment belongs is determined based on the distribution of the position index set in the historical reference sequence. The historical sequence regression quantity and the historical envelope escape retention quantity are input into the phased mirror dual-domain learning model of the corresponding fermentation stage to obtain the new change retention coefficient. Then, the candidate change fragment is divided into new change feature fragments or regression fragments according to the new change retention coefficient.
[0012] Furthermore, the inherited feature set is first segmented according to the original sampling position to obtain inherited sub-segments. Then, the historical alignment numbers of the start and end sampling numbers of the corresponding inherited sub-segments are read from the full position historical alignment sequence as the first and last anchor points of the inherited sub-segments. The inheritance process ratio is established based on the cumulative change path within the inherited sub-segment after reference amplitude normalization. The historical mapping position is generated using the inheritance process ratio to form a continuous prediction segment.
[0013] Furthermore, the new variable feature set is segmented according to the original sampling position to obtain new variable segments, and the left transition data, right transition data and the connection end of the adjacent continuous prediction segments connected to the new variable segments are read. The change rate of the left and right boundaries is determined based on the mean of the last position of the left transition, the mean of the first position of the right transition and the corresponding boundary prediction value. Then, the new variable morphology process ratio is generated based on the cumulative change path inside the new variable segments, and local prediction segments are formed by segmented cubic Hermit interpolation.
[0014] Furthermore, after obtaining measured exhaust gas component values at all original sampling locations covered by the segmented prediction results, a confirmed sample sequence is generated. The sequence is then synchronously divided into confirmed continuation segments and confirmed new variation segments according to the segment boundaries in the segmented prediction results. The component sequence consistency rate between the local predicted segments and the confirmed new variation segments, as well as the placement rate of the confirmed new variation segments relative to the historical containment envelope, are calculated along the analysis window boundaries used in step S2.
[0015] Furthermore, the component sequence consistency rate is compared with the sequence verification threshold, and the placement rate is compared with the placement verification threshold. When both comparisons are satisfied, the corresponding confirmed new variant fragment is added to the corresponding stage reference subsequence according to its fermentation stage, and the mapping result of the corresponding new variant feature fragment is recursively merged into the prototype center of the new variant fragment sample domain of the corresponding fermentation stage. When either comparison is not satisfied, the corresponding new variant feature fragment and the corresponding confirmed new variant fragment are transferred to isolated samples.
[0016] The technical effects and advantages of the self-learning online prediction method for fermentation exhaust gas component data of this invention are as follows: This invention revolves around continuous online data of fermentation exhaust gas. It sequentially transforms raw multi-component exhaust gas data into candidate segments of change, inherited feature sets, new change feature sets, and segmented prediction results. This ensures a clear connection between data objects at each step, avoiding the direct incorporation of new changes in the current batch into historical experience before prediction. By using historical sequence regression and historical envelope escape residence together for segment attribution determination, it analyzes both the relative structure of multi-components and identifies amplitude deviation states, making the source of subsequent prediction objects clear. Furthermore, the inherited feature set and the new change feature set correspond to different prediction paths: the former expands along the historical reference sequence, and the latter expands along boundary continuity conditions. Combined with confirmed samples, segmented consistency verification and controlled write-back are performed, ensuring that the updates of the historical reference sequence and the self-learning prediction model are based on verified segments. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the self-learning online prediction method for fermentation tail gas component data according to the present invention. Figure 2 This is a schematic diagram illustrating the alignment comparison between the current exhaust gas sequence and the historical reference sequence, as well as the formation of candidate segments for changes. Figure 3 This is a schematic diagram of the two-dimensional attribution determination of the candidate fragments of the present invention; Figure 4 This is a schematic diagram of the phased mirror dual-domain learning model and the output of the new variable retention coefficients of the present invention; Figure 5 This is a schematic diagram of the dual-path generation and segmented backfilling of inheritance prediction and new change prediction in this invention. Figure 6This invention confirms sample verification and controlled write-back update diagrams. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please see Figures 1-6 This invention provides a self-learning online prediction method for fermentation exhaust gas component data, comprising: S1. Write the continuously collected multi-component data of fermentation tail gas into the current tail gas sequence according to the sampling time sequence, and establish a corresponding comparison sequence based on the historical reference sequence. Use a continuous analysis window to extract the combination of the change direction of each tail gas component relative to the previous continuous analysis window. After comparing window by window, merge the continuous analysis windows that do not meet the consistency relationship into change candidate segments.
[0020] S2. Extract the corresponding historical aligned segments for the candidate segments of change, and divide the analysis window accordingly. Generate the component sequence string based on the component proportion, calculate the historical sequence regression amount and the historical envelope escape residence amount, and input the two into the phased mirror dual-domain learning model to obtain the new change retention coefficient. Divide the candidate segments of change into new change feature segments or regression segments according to the new change retention coefficient, forming the inherited feature set and the new change feature set.
[0021] S3. Divide the inherited feature set into inherited segments according to the original position in the current exhaust gas sequence, and perform historical prediction mapping based on the historical reference sequence to obtain the continued prediction segment. Then, divide the new variable feature set into new variable segments according to the original position, and perform local prediction mapping based on the connecting transition data and the connection end of the adjacent continued prediction segment to obtain the local prediction segment. Finally, backfill according to the original position to form the segmented prediction result.
[0022] S4. After obtaining the confirmed samples corresponding to the segmented prediction results, the segments are synchronously divided according to the segment boundaries in the segmented prediction results to obtain confirmed continuation segments and confirmed new change segments. The segmented consistency verification is performed on the local prediction segments and the corresponding confirmed new change segments. The new change feature segments that pass the verification are written into the historical reference sequence, and the new change feature segments that fail the verification are transferred to the isolation samples.
[0023] The processing scheme of this invention takes the current exhaust gas sequence as the input starting point. First, it identifies candidate segments of change by comparing them with the historical reference sequence. Then, it uses the historical sequence regression amount and the historical envelope escape residence amount to determine whether the aforementioned segments belong to the part that can be processed continuously or the part that should be processed independently, thereby forming an inherited feature set and a new change feature set. Subsequently, historical prediction mapping is performed on the inherited feature set, and local prediction mapping is performed on the new change feature set. The segmented prediction results are then backfilled according to the original sampling positions. Finally, segmented consistency verification is performed based on the confirmed samples, and write-back updates are only performed on the new change feature segments that meet the conditions.
[0024] During continuous online acquisition of fermentation exhaust gas, raw multi-component data continuously enters over time. This data includes normal changes resulting from the gradual progression of cell metabolism, as well as deviation signals caused by local disturbances, phase transitions, and short-term anomalies. If subsequent analysis proceeds without distinguishing these differences, the continuity relationships in the historical reference sequence and the new changes in the current batch will be mixed in the same data stream, making it difficult to reliably identify which segments should be prioritized for processing. Therefore, step S1 first focuses on the correspondence between the current exhaust gas sequence and the historical reference sequence. By establishing a common comparative basis, the continuously arriving exhaust gas changes are transformed into time-series objects that can be analyzed window by window, providing clear boundaries for the formation of candidate change segments.
[0025] Step S1 includes the following: S101: Establishment of the current exhaust gas sequence and historical reference sequence.
[0026] In the scenario of continuous online acquisition of fermentation exhaust gas, the sampled values of all exhaust gas components obtained at the same sampling time are first written into the same time series record according to the pre-set exhaust gas component order. Then, all time series records are arranged in sequence according to the sampling order to form the current exhaust gas sequence. The historical batch exhaust gas data corresponding to the current exhaust gas sequence are arranged in the same exhaust gas component order, the same sampling interval, and the same record format to form a historical reference sequence. Each sampling position in the current exhaust gas sequence retains the original sampling time order, and each historical sampling position in the historical reference sequence also retains the original historical time order, so that subsequent processing is always carried out under the same exhaust gas component order and the same sampling granularity.
[0027] S102: Generation of reference amplitude and progressive range coordinates.
[0028] To ensure that different exhaust gas components participate in subsequent alignment processing on the same comparative scale, firstly, for each exhaust gas component in the historical reference sequence, the maximum and minimum sampled values of that component are extracted throughout the entire historical reference sequence. The minimum sampled value is subtracted from the maximum, and then the minimum resolvable concentration interval of the corresponding exhaust gas component is superimposed to obtain the reference range of that component. The minimum resolvable concentration interval is taken from the calibration results of the online detection device for that exhaust gas component, and is used to directly incorporate the instrument's resolution into the reference range. Subsequently, starting from the second sampling position of the current exhaust gas sequence, the absolute change of each exhaust gas component between each sampling position and the previous sampling position is calculated, and then divided by the reference range of the corresponding exhaust gas component. The normalized changes of all exhaust gas components are then summed to obtain the normalized change path of the sampling position relative to the previous sampling position. This normalized change path is then summed sequentially according to the sampling order to form the progressive range coordinates of the current exhaust gas sequence. The historical reference sequence is processed using the same method to obtain the progressive range coordinates of the historical reference sequence.
[0029] S103: Generation of historical alignment numbers and comparison sequences.
[0030] Using each sampling position of the current exhaust gas sequence as a reference, the first historical sampling position not less than the current progressive range coordinate is found in the progressive range coordinates of the historical reference sequence, and this historical sampling position is recorded as the historical alignment number corresponding to the current sampling position. When searching for subsequent historical alignment numbers, the search starts from the position of the previous historical alignment number and continues backward, thus ensuring that all historical alignment numbers advance unidirectionally according to the sampling order. When the progressive range coordinates of the current exhaust gas sequence have exceeded the progressive range coordinates at the end of the historical reference sequence, subsequent sampling positions are uniformly mapped to the end position of the historical reference sequence. After all historical alignment numbers are generated, according to the historical alignment number corresponding to each current sampling position, historical sampling values under the same exhaust gas component order are extracted from the historical reference sequence and written back in the order of the current sampling positions to form a comparison sequence. Thus, the comparison sequence has the exact same sampling position framework as the current exhaust gas sequence, with only the values derived from the corresponding sampling values of the historical reference sequence at the same progress position.
[0031] S104: Generation of the ratio of continuous analysis window to direction.
[0032] After establishing the current exhaust gas sequence and the comparison sequence, continuous analysis windows are arranged along the current exhaust gas sequence with a fixed window length and a fixed sliding step size. Each continuous analysis window contains the same number of sampling positions. The fixed window length can be calculated based on the average residence time of the gas path and the sampling interval. Specifically, it can be determined according to the rule of adding one additional sampling position based on the number of sampling points corresponding to the average residence time of the gas path, for example, 4 to 12 sampling positions. The fixed sliding step size is preferably 1 to 3 sampling positions. For each exhaust gas component in each continuous analysis window, all sampled values within the coverage area of the continuous analysis window are first accumulated in the sampling order, and each sampled value is multiplied by the sampling interval and then summed to obtain the window area of the current exhaust gas sequence within the continuous analysis window. Then, the same processing is performed on the sampling segment of the same length immediately preceding the continuous analysis window to obtain the preceding window area. The window area and preceding window area of the comparison sequence are calculated simultaneously within the same sampling position range as the current exhaust gas sequence. Subsequently, the difference between the window area and the preceding window area is used as the directional change. A normalized benchmark is then constructed using the absolute values of the window area, the preceding window area, and the minimum resolvable area to obtain the directional ratio. The minimum resolvable area is determined by the minimum resolvable concentration interval, the number of sampling locations included in the continuous analysis window, and the sampling interval, and is used to convert the instrument's resolution limit to the continuous analysis window scale. The directional ratio characterizes the net direction and intensity of change of the same exhaust gas component within the current continuous analysis window relative to the preceding window, and has eliminated the direct influence of differences in the absolute magnitude of different exhaust gas components.
[0033] S105: Generation of change direction value, consistency and inconsistency window markers.
[0034] For each exhaust gas component, the directional resolution threshold is first generated based on the average window area of the historical reference sequence on a continuous analysis window scale, combined with the minimum resolvable area. Specifically, the directional resolution threshold can be determined by multiplying the ratio of the minimum resolvable area to the sum of the historical average window area and the minimum resolvable area by a preset resolution amplification factor, where the resolution amplification factor is a preset constant between 1 and 3. To avoid noise misjudgment due to an excessively small threshold, or the true changes being masked by an excessively large threshold, the directional resolution threshold is further limited to between 0.05 and 0.30. When the result obtained according to the aforementioned rule is less than 0.05, a value of 0.05 is used; when the result is greater than 0.30, a value of 0.30 is used. Taking a certain exhaust gas component as an example, when its historical average window area is significantly larger than the corresponding minimum resolvable area, the obtained directional resolution threshold usually falls between 0.08 and 0.12. Subsequently, the direction ratio of the current exhaust gas sequence is compared with the direction resolution threshold. When the direction ratio is not less than the direction resolution threshold, the change direction value of the exhaust gas component in the continuous analysis window is recorded as increasing; when the absolute value of the direction ratio is less than the direction resolution threshold, the change direction value is recorded as remaining flat; and when the direction ratio is not greater than the opposite of the direction resolution threshold, the change direction value is recorded as decreasing. The comparison sequences generate change direction values using the same rules. After generating change direction values for all exhaust gas components, the change direction values of the corresponding exhaust gas components in the current exhaust gas sequence and the comparison sequence are compared one by one in each continuous analysis window. The number of exhaust gas components with the same change direction value is divided by the total number of exhaust gas components to obtain the consistency of the continuous analysis window. Then, the consistency is judged according to the preset consistency threshold. Let the total number of exhaust gas components be K, and the number of exhaust gas components with inconsistent directions be r. Then, the consistency threshold is the ratio obtained by "the total number of exhaust gas components minus the number of inconsistent components, divided by the total number of exhaust gas components". r is preset according to the degree of instantaneous disturbance allowed in the process stage, preferably 1 or 2. Taking a total of 5 exhaust gas components and allowing one component to have inconsistent directions as an example, the consistency threshold is 0.8; taking a total of 6 exhaust gas components and allowing two components to have inconsistent directions as an example, the consistency threshold is approximately 0.667. When the consistency is lower than the consistency threshold, the continuous analysis window is recorded as an inconsistency window and labeled as such.
[0035] S106: Formation of initial window segment, merged window segment and change candidate segment.
[0036] The process involves scanning segment by segment along the order of the inconsistent window markers, merging consecutive inconsistent windows into initial window segments. Then, the length of the interruption segment separated by consistent windows between two adjacent initial window segments is checked. If the number of consecutive analysis windows corresponding to the interruption segment does not exceed the connection threshold, the interruption segment is merged into the two initial window segments to form a merged window segment. The connection threshold is calculated from the allowable interruption time, the sliding step size, and the sampling interval. Specifically, the connection threshold can be determined by dividing the allowable interruption time by the time span corresponding to a single window sliding and rounding the result up. The time span corresponding to a single window sliding is determined by the sliding step size and the sampling interval, while the allowable interruption time reflects the acceptable interruption length of the gas path retention and sampling flushing process on the time scale. For example, with a sampling interval of 30 seconds, a sliding step size of 2 sampling positions, and an allowable interruption time of 180 seconds, the connection threshold can be set to 3, meaning that if the interval between two initial window segments does not exceed 3 consecutive analysis windows, they are still considered the same change process. After the merged window segment is generated, the starting sampling position of the first continuous analysis window of each merged window segment is taken as the starting sampling position of the candidate segment for change, and the ending sampling position of the last continuous analysis window is taken as the ending sampling position of the candidate segment for change. In this way, the window-level judgment result is restored to the sampling position boundary to form the candidate segment for change. At the same time, the historical alignment numbers corresponding to all current sampling positions within the coverage area of the candidate segment for change are collected in sequence to form the alignment index set of the candidate segment for change.
[0037] Step S1 ends here, and the output object is clearly limited to the candidate fragment of change and its corresponding alignment index set. Step S2 extracts the historical aligned fragment based on the aforementioned boundary, and continues to generate the inherited feature set and the new change feature set under the same sampling position framework.
[0038] After step S1 is completed, the continuous changes in the current exhaust gas sequence have been mapped to a unified time-series framework comparable to the historical reference sequence. Segments that satisfy the continuity relationship and those that deviate from it are separated and identified. Windows that continuously do not satisfy the continuity relationship are merged to form candidate segments of change. What is obtained at this point is not a simple anomaly label, but a segment object with clear start and end boundaries and a historical basis. Subsequent segment determination is based on these fixed boundaries, and the data object is transformed from the original streaming input into candidate segments that can be analyzed segment by segment.
[0039] Although candidate segments of change have been extracted from the current exhaust gas sequence, these segments do not necessarily represent new changes that should be retained. They may contain local segments that truly reflect changes in the metabolic state of the current batch, or they may contain natural swings that can still be explained by historical continuity. If these two types of cases are not distinguished, the subsequent prediction process will not be able to determine which segments should be expanded along the historical reference sequence and which segments should be processed separately based on the local state of the current batch. Based on this, step S2 analyzes the candidate segments of change together with the historical aligned segments and the boundary transition scenario, identifying their structural and amplitude attributions within the same window scale.
[0040] Step S2 includes the following: S201: Establishment of historical aligned fragment extraction and analysis window.
[0041] For each candidate segment of change output in step S1, first read the start sampling number, end sampling number, and alignment index set of the candidate segment of change. Then, according to the start and end sampling numbers, extract the corresponding sampling segment from the current exhaust gas sequence to form a candidate segment of change sequence. Next, according to all historical sampling positions recorded in the alignment index set, extract the corresponding sampling values position by position from the historical reference sequence, maintaining the original order of the alignment index set, to form a historical aligned segment with the same length as the candidate segment of change sequence and the same order of exhaust gas components. Subsequently, using the start sampling number of the candidate segment of change as the boundary, trace back a preset transition span of sampling positions, extract the left transition data, and use the end sampling number of the candidate segment of change as the boundary. Using the boundary as the boundary, extend backward by a preset transition span of sampling positions to extract right-side transition data. The transition span represents the number of sampling positions used to characterize the natural transition state near the boundary of the candidate segment of change. For example, it can be 1 to 2 times the length of the continuous analysis window. After all four types of data are established, according to the continuous analysis window length fixed in step S1, the candidate segment of change, the historical aligned segment, the left transition data, and the right transition data are divided into non-overlapping segments to obtain the candidate segment of change analysis window, the historical aligned segment analysis window, the left transition analysis window, and the right transition analysis window. This transforms the segment boundary and historical alignment relationship given in step S1 into a window-level comparison object that can be directly executed in step S2.
[0042] S202: Generation of component proportions and component sequence strings.
[0043] After the analysis window is established, for any exhaust gas component in any type of analysis window, first, all sampled values of the exhaust gas component within the coverage area of the current analysis window are accumulated in the sampling order to obtain the window component sum of the exhaust gas component. Then, the window component sums of all exhaust gas components within the current analysis window are accumulated again to obtain the total component sum of the current analysis window. Subsequently, the window component sum is divided by the total component sum to obtain the component proportion of the exhaust gas component in the current analysis window. The component proportions of the change candidate segment analysis window, the historical aligned segment analysis window, the left transition analysis window, and the right transition analysis window are all generated in the same way. After obtaining the proportions of all components, all exhaust gas components are arranged in descending order of component proportion within each analysis window. When the component proportions are the same, they are stably sorted according to a pre-fixed order of exhaust gas components, thus obtaining the component sequence string of the current analysis window. The component sequence string reflects the relative contribution order of each exhaust gas component within the same analysis window and does not directly depend on the absolute concentration. Therefore, the structural differences of multi-component exhaust gases in different batches and stages can be converted into a comparable sequence structure.
[0044] S203: Calculation of the set of transitional inversion pairs and the historical order reversion quantity.
[0045] After the component sequence string is generated, the transition inversion pair set is first extracted from the left and right transition analysis windows. Specifically, the component sequence strings of two adjacent left transition analysis windows are compared in turn. If the order of any pair of exhaust gas components in the previous window is reversed in the next window, then the aforementioned exhaust gas component pair is recorded as an inversion pair. The right transition analysis window is also extracted in the same way. Then, all the inversion pairs obtained from the left and right transition analysis windows are deduplicated and merged to form the transition inversion pair set. Subsequently, for each candidate segment analysis window, the component sequence string of the current candidate segment analysis window is compared one by one with the component sequence string of the corresponding historical aligned segment analysis window. If any pair of exhaust gas components has the reversed order in the aforementioned two component sequence strings, that is, the aforementioned exhaust gas component pair is recorded as a window inversion pair. All window inversion pairs in the current analysis window are then collected into a window inversion pair set. If every window inversion pair in the current window inversion pair set can find an identical exhaust gas component pair in the transition inversion pair set, then the current candidate segment analysis window is recorded as a regression window. After all candidate segment analysis windows have been determined, the number of regression windows is divided by the total number of candidate segment analysis windows to obtain the historical sequence regression value. The historical sequence regression value indicates whether the sequence change in the candidate segment can be gradually explained by the natural sequence reversal pattern that has already appeared near the segment boundary. The higher the value, the closer the candidate segment is to a natural swing in historical continuity, rather than an independent new change.
[0046] S204: Establishment of historical containment envelope and calculation of historical envelope escape and retention.
[0047] After the historical sequence regression is formed, the attribution of candidate segments of change is further determined at the amplitude level. First, for each exhaust gas component in each candidate segment analysis window, the mean value of the candidate segment analysis window and the mean value of the historical aligned segment analysis window are calculated. Then, the current candidate segment analysis window is mapped to the left transition analysis window and the right transition analysis window according to their relative positions, and the mean values of the corresponding left transition analysis window and the corresponding right transition analysis window are calculated. After obtaining the above four types of mean values, the median value of the mean value of the historical aligned segment analysis window, the mean value of the corresponding left transition analysis window, and the mean value of the corresponding right transition analysis window is used as the component center value. Then, the maximum absolute deviation of the three values from the component center value is superimposed with the minimum resolvable concentration interval defined in step S1 to obtain the component fluctuation range. Subsequently, the lower envelope is formed by subtracting the component fluctuation range from the component center value, and the upper envelope is formed by adding the component fluctuation range to the component center value. Thus, the historical containment envelope corresponding to the current analysis window and the current exhaust gas component is established.
[0048] After establishing the historical containment envelope, the mean value of the candidate segment analysis window is compared with the corresponding historical containment envelope one by one. If the mean value of the candidate segment analysis window falls between the lower and upper envelopes, the window-level escape is recorded as zero. If the mean value of the candidate segment analysis window is higher than the upper envelope, the window-level escape is taken as the difference between the mean value of the candidate segment analysis window and the upper envelope. If the mean value of the candidate segment analysis window is lower than the lower envelope, the window-level escape is taken as the difference between the lower envelope and the mean value of the candidate segment analysis window. Subsequently, analysis windows with continuously positive window-level escape values in the same exhaust gas component are grouped into a residence segment. The average escape value is calculated for each residence segment, and then the average escape value is multiplied by the residence segment duration to obtain the residence segment escape residence value. Finally, the residence segment escape residence values of all residence segments of all exhaust gas components are summed, and then divided by the cumulative value of the average width of the historical containment envelope and the duration of the candidate segment for all exhaust gas components to obtain the historical envelope escape residence value. The aforementioned historical envelope escape and residence data simultaneously characterize the escape amplitude and escape duration, thus distinguishing between short-term escape and continuous detachment.
[0049] S205: Fermentation stage determination and new variation retention coefficient output.
[0050] After obtaining the historical sequence regression and historical envelope escape residence, the fermentation stage to which the candidate fragment belongs is determined based on the distribution of the landing points of the alignment index set in the historical reference sequence. Specifically, the historical reference sequence is pre-divided into multiple stage intervals according to the process stage markings. The process stage markings can be generated based on the inoculation, feeding, pH switching, dissolved oxygen control switching, product synthesis start-up or steady-state end nodes in the historical batch production records, or they can be manually marked or imported from the host computer batch records. Then, the number of historical sampling positions falling into each stage interval in the alignment index set is counted, and the stage interval with the most historical sampling positions is determined as the fermentation stage to which the current candidate fragment belongs.
[0051] Once the fermentation stage is determined, the corresponding staged mirror dual-domain learning model is invoked. The staged mirror dual-domain learning model is built separately for each fermentation stage, with one independent model for each stage. Each model employs a Siamese neural network structure, including a left mirror branch, a right mirror branch, and a shared feature map. The left and right mirror branches use the same set of network parameters. The input objects are historical sequence regression values and historical envelope escape residence values, and the output is the segment mapping result in a unified feature space. The shared feature map uses a three-layer fully connected structure. The input layer receives historical sequence regression values and historical envelope escape residence values, the intermediate layers use a fixed number of neurons and non-linear activation sequentially, and the output layer generates the segment mapping vector. For example, the input layer has 2 neurons, the first hidden layer has 16 neurons, the second hidden layer has 8 neurons, the output layer has 4 neurons, the hidden layer activation function uses ReLU, and the output layer does not use compressed activation. Before training, regression segment sample sets and new variable segment sample sets are constructed according to confirmed regression segment samples and confirmed new variable segment samples, respectively, and archived according to the fermentation stage.
[0052] During training, samples within the same fermentation stage are organized in pairs, including three types of training pairs: regression fragments paired with regression fragments, novel fragments paired with novel fragments, and regression fragments paired with novel fragments. The first two types of training pairs are used to compress the intervals of samples within the same domain in the feature space, while the last type of training pairs is used to widen the intervals of samples from different domains in the feature space. Optimization employs both contrastive loss and domain center constraints. The contrastive loss constrains the relative distance between training pairs, while the domain center constraint causes the regression fragment sample set to cluster towards the prototype center of the regression fragment sample domain, and the novel fragment sample set to cluster towards the prototype center of the novel fragment sample domain. Parameter updates use mini-batch iterative training, and the optimization algorithm uses adaptive moment estimation. The batch size, training epochs, initial learning rate, and stopping condition are all fixed before training. Preferably, the batch size is 16 to 64, the training epochs are 50 to 300, the initial learning rate is 0.0005 to 0.005, and the stopping condition is early termination when the validation loss does not decrease for 10 consecutive epochs. After training, the centers of the mapping results of the regression fragment sample set and the new variant fragment sample set are calculated to obtain the prototype centers of the regression fragment sample domain and the new variant fragment sample domain for the corresponding fermentation stage.
[0053] During prediction, the historical sequence regression value and historical envelope escape retention value corresponding to the current change candidate fragment are input into the shared feature mapping of the corresponding fermentation stage to obtain the current fragment mapping result. Then, the Manhattan distance from the current fragment mapping result to the prototype center of the regression fragment sample domain and the prototype center of the new change fragment sample domain are calculated respectively. Subsequently, the above two distances are converted into the new change retention coefficient. The conversion method is to first take the negative of the two distances and then calculate the exponent value. Then, the exponent value corresponding to the new change distance is divided by the sum of the two exponent values to obtain the new change retention coefficient between 0 and 1. The closer the new change retention coefficient is to the upper limit, the closer the current change candidate fragment is to the new change fragment sample domain. The closer it is to the lower limit, the closer the current change candidate fragment is to the regression fragment sample domain.
[0054] S206: Generation of new variable feature fragments and inherited feature sets.
[0055] After the new variant retention coefficient is formed, it is compared with the new variant determination threshold. The new variant determination threshold is derived from the boundary results of the confirmed regression fragment samples and confirmed new variant fragment samples on the validation set during the training phase. Its physical meaning is the minimum retention level required for a candidate variant fragment to be identified as a new variant feature fragment. For example, the new variant determination threshold is preferably the coefficient corresponding to the largest F1 value or the largest Youden index in the validation set, with an preferred range of 0.60 to 0.70, and an preferred value of 0.65. When the new variant retention coefficient is not lower than the new variant determination threshold, the current candidate variant fragment is recorded as a new variant feature fragment; when the new variant retention coefficient is lower than the new variant determination threshold, the current candidate variant fragment is recorded as a regression fragment. After all candidate variant fragments have been determined, all regression fragments and the sequence portion other than the candidate variant fragments are written back to the same position frame in the original sampling position order in the current exhaust gas sequence to form an inherited feature set. Then, all new variant feature fragments and their corresponding left and right transition data are written back to the same position frame in the original sampling position order in the current exhaust gas sequence to form a new variant feature set. At this point, step S2 completes the attribution conversion from candidate segments of change to inherited feature set and new feature set. Step S3 can then directly use the aforementioned original position framework to segment inherited feature set into inherited segments and new feature set into new segments, and continue to perform historical prediction mapping and local prediction mapping.
[0056] After step S2 is completed, the candidate segments of change are no longer in the state of waiting to be identified. Instead, they are divided into new feature segments or regression segments based on the historical sequence regression amount and the historical envelope escape and residence amount. The regression segments and the sequence parts that have not entered the candidate segments of change together constitute the inherited feature set, and the new feature segments and the adjacent transition data together constitute the new feature set. Thus, the aforementioned segment attribution relationship is fixed, and the parts in the current batch that can be processed along the history are clearly separated from the parts that need to be processed independently. The data flow is transformed from candidate segment judgment to dual-path input objects.
[0057] After the inherited feature set and the new variation feature set are formed, different segments in the current exhaust gas sequence have different processing foundations. However, the aforementioned two types of objects are still just data segments that have been divided, and they do not constitute directly verifiable prediction results. The inherited feature set corresponds to historical continuity, and the new variation feature set corresponds to local new changes. If the two adopt the same prediction path, it will weaken the distinguishing value brought by segment attribution. Based on this, step S3 establishes prediction expansion methods for the aforementioned dual-path objects, so that one type of segment generates predictions along historical correspondences, and the other type of segment generates predictions along boundary continuity conditions and local morphology, and writes them back to the original sampling position framework.
[0058] Step S3 includes the following: S301: Location of inherited sub-segments and new variant sub-segments.
[0059] After step S2 is completed, the inherited feature set and the new variant feature set are formed within the original sampling position framework of the current exhaust gas sequence. The inherited feature set corresponds to the sequence portion that can continue to be predicted along the historical continuity relationship, while the new variant feature set corresponds to the sequence portion that needs to be predicted separately. Therefore, the inherited feature set is first scanned sequentially along the original sampling positions, and the sequence portions with continuous original sampling positions, complete exhaust gas component records, and consistent segment types are merged into an inherited sub-segment. The first original sampling position in the aforementioned inherited sub-segment is recorded as the starting sampling number of the inherited sub-segment, and the last original sampling position is recorded as the ending sampling number of the inherited sub-segment. Subsequently, the new variant feature set is scanned sequentially along the original sampling positions, and the sequence portions with continuous original sampling positions, complete exhaust gas component records, and consistent segment types are merged into a new variant sub-segment. The first original sampling position in the aforementioned new variant sub-segment is recorded as the starting sampling number of the new variant sub-segment, and the last original sampling position is recorded as the ending sampling number of the new variant sub-segment. The inherited sub-segment and the new variant sub-segment... After all segments are formed, the historical alignment sequence corresponding to the starting sampling sequence of the inherited sub-segment is read from the full-position historical alignment sequence retained in step S1, and used as the first anchor point of the inherited sub-segment. The historical alignment sequence corresponding to the ending sampling sequence of the inherited sub-segment is read, and used as the last anchor point of the inherited sub-segment. At the same time, the left transition data directly connected to the left boundary of the new variable sub-segment and the right transition data directly connected to the right boundary of the new variable sub-segment are read from the new variable feature set retained in step S2. The last predicted value of the adjacent left-side continuous prediction segment is defined as the left boundary prediction value, and the first predicted value of the adjacent right-side continuous prediction segment is defined as the right boundary prediction value. If the new variable sub-segment is located at the beginning or end of the processing range and there is only a single-sided adjacent continuous prediction segment, the boundary position on the other side is supplemented by the historical value of the corresponding boundary sampling position in the historical alignment segment. Thus, each of the aforementioned sub-segments obtains a fixed time position basis and boundary position basis for subsequent historical prediction mapping and local prediction mapping.
[0060] S302: Historical prediction mapping and generation of continuation prediction segments.
[0061] After the inherited sub-segment is located, a continuous prediction segment is generated for each inherited sub-segment. Specifically, starting from the initial sampling sequence number of the inherited sub-segment, the sampling value differences of each exhaust gas component between two adjacent local sampling positions within the inherited sub-segment are compared sequentially. The absolute value of the aforementioned difference for each exhaust gas component is taken and then divided by the corresponding exhaust gas component reference amplitude defined in step S1. The changes in all exhaust gas components between the same pair of local sampling positions after reference amplitude normalization are accumulated to obtain the normalized change path of the current position relative to the previous position. Subsequently, according to the local sampling sequence within the inherited sub-segment... The normalized change path is accumulated sequentially from the initial sampling position of the inherited sub-segment to the current local sampling position. This accumulated normalized change path is then divided by the total accumulated normalized change path of the entire inherited sub-segment. An inheritance process compensation is added to the denominator to obtain the inheritance process ratio. The inheritance process compensation is the process amount at a single sampling position corresponding to the minimum resolvable concentration interval of each exhaust gas component within the inherited sub-segment, normalized to a reference amplitude. This compensation is used to handle normalization when the change within the inherited sub-segment is extremely weak. Stability; After the inheritance process ratio is formed, the historical span between the first and last anchor points of the inherited sub-segment is used as the mapping interval. The inheritance process ratio is written into the aforementioned historical span to obtain the historical mapping position number of the corresponding local sampling position in the historical reference sequence. After the historical mapping position number is formed, the previous historical sampling position not greater than the aforementioned historical mapping position number and the subsequent historical sampling position not less than the aforementioned historical mapping position number are taken from the historical reference sequence. Then, based on the relative position of the aforementioned historical mapping position number between the previous and subsequent historical sampling positions, a linear interpolation is performed on the two historical values of the corresponding exhaust gas component to obtain the predicted value of the corresponding local sampling position in the continuation prediction segment. The aforementioned processing is carried out sequentially along all local sampling positions inside the inherited sub-segment, and finally a continuation prediction segment is formed that corresponds one-to-one with the original sampling position of the inherited sub-segment. The basis for the formation of the aforementioned continuation prediction segment is that the inherited sub-segment has been determined in step S2 to be interpretable by the historical continuation relationship. Therefore, its predicted value is carried out along the same process interval of the historical reference sequence, which can maintain the positional consistency of the historical continuation relationship in the current batch.
[0062] S303: Local prediction mapping and local prediction fragment generation.
[0063] After the prediction segments are formed, local prediction segments are generated for each new variable segment. First, the last analysis window closest to the left boundary of the new variable segment is taken from the left transition data, and the window mean of each exhaust gas component within the last analysis window is calculated to obtain the left transition last mean. Then, the first analysis window closest to the right boundary of the new variable segment is taken from the right transition data, and the window mean of each exhaust gas component within the first analysis window is calculated to obtain the right transition first mean. Based on the above, the left boundary change rate is obtained by subtracting the left transition last mean from the left boundary prediction value and dividing by the time interval between the center of the left transition last analysis window and the left boundary of the new variable segment. The right boundary change rate is obtained by subtracting the right boundary prediction value from the right transition first mean and dividing by the time interval between the right boundary of the new variable segment and the center of the right transition first analysis window. Thus, the aforementioned two boundary change rates respectively characterize the left and right ends of the new variable segment and the adjacent continuous region. The direction of change between segments is determined; subsequently, the process ratio of the new transformation mode is calculated for each local sampling position within the new transformation segment. Specifically, the difference between the sampling values of all exhaust gas components between two adjacent local sampling positions from the starting sampling position of the new transformation segment to the current local sampling position is calculated sequentially. The absolute value of the difference is taken and then divided by the corresponding exhaust gas component reference amplitude defined in step S1. The changes of all exhaust gas components between the same pair of local sampling positions after normalization by the reference amplitude are accumulated to obtain the new transformation mode path completed before the current position. The new transformation mode path is then accumulated sequentially along the new transformation segment, and the accumulated value is divided by the total accumulated normalized change path of the entire new transformation segment. The new transformation process compensation amount is added to the denominator to obtain the new transformation mode process ratio. The new transformation process compensation amount is the process amount of a single sampling position corresponding to the minimum resolvable concentration interval of each exhaust gas component within the new transformation segment after normalization by the reference amplitude.
[0064] After the new variant process ratio is formed, the predicted values of the left and right boundaries are used as the two boundary values of the local prediction segment, and the change rates of the left and right boundaries are used as the two boundary derivatives. Then, the new variant process ratio is used as the interpolation independent variable. Piecewise cubic Hermitian interpolation is used to generate the predicted values of each exhaust gas component in the local prediction segment point by point. The processing method of piecewise cubic Hermitian interpolation is as follows: first, the left boundary value preservation term, the right boundary value preservation term, the left boundary derivative propagation term, and the right boundary derivative propagation term are calculated according to the new variant process ratio. Then, the above four terms are multiplied by the predicted values of the left and right boundaries, the product of the change rate of the left boundary and the duration of the new variant segment, and the product of the change rate of the right boundary and the duration of the new variant segment, respectively. Finally, the above four terms are summed to obtain the predicted value of the corresponding local sampling position in the local prediction segment. In this way, the aforementioned local prediction segment maintains the continuous connection between the left and right boundaries and the continuous prediction segment, and also retains the advancement rhythm reflected by the observation morphology of the new variant segment in the current batch.
[0065] S304: Backfilling of segmented prediction results.
[0066] After all the continuous and local prediction segments are formed, a unified location framework is established based on the original sampling positions of the current exhaust gas sequence. The unified location framework covers all original sampling positions of the inherited feature set and the new variable feature set formed in step S2. Subsequently, each continuous prediction segment is written back to the unified location framework point by point according to the starting sampling number of the corresponding inherited sub-segment to the ending sampling number of the inherited sub-segment. Each local prediction segment is written back to the unified location framework point by point according to the starting sampling number of the corresponding new variable sub-segment to the ending sampling number of the new variable sub-segment. If adjacent segments share the same boundary sampling position, the boundary position is processed by using the left-closed-right-open write-back method for the previous segment and the left-closed-right-closed write-back method for the last segment, so that each original sampling position in the unified location framework receives only one prediction value write. After all write-backs are completed, a prediction value sequence covering the entire processing range is formed in the unified location framework. At the same time, the segment type, the inherited sub-segment number or the new variable sub-segment number, and the boundary position mark are recorded synchronously for each original sampling position. The aforementioned prediction value sequence and the synchronously recorded segment mark information together constitute the segmented prediction result. After the segmented prediction results are formed, step S4 can perform synchronous segmentation on the subsequently collected confirmed samples according to the boundary position marks and segment numbers in the unified location framework, and complete the segment consistency verification along the same segment boundaries.
[0067] After step S3 is completed, the inherited feature set has been converted into a continuous prediction fragment, and the new feature set has been converted into a local prediction fragment. The two types of prediction fragments are then backfilled into the same position frame according to the original sampling position order to form a segmented prediction result. At this point, a prediction sequence corresponding to each point of the original sampling position is obtained, while retaining the fragment type, fragment number, and boundary position markers. The mapping relationship between the prediction object and the original input has been fixed, and the fragment-level judgment has been moved to a verifiable point-by-point prediction expression.
[0068] After the segmented prediction results are generated, the local predicted segments already reflect the newly identified change trajectories in the current batch. However, whether the trajectories are suitable for being written into the historical reference sequence and participating in self-learning updates still needs to be confirmed by subsequent experimental results. If all new changes are written back to the historical reference sequence without verification, transient disturbances, sampling biases, and unstable segments will be introduced into the historical basis, thereby changing the basis for segment judgment and prediction in the next round. Based on this, after confirming the arrival of samples, step S4 does not regenerate predictions, but instead performs synchronous segmentation, segmented verification, and controlled write-back based on the existing segmented prediction results.
[0069] Step S4 includes the following: S401: Confirm sample sequence generation and synchronous segmentation.
[0070] Once the measured exhaust gas component values have been obtained for all original sampling locations covered by the segmented prediction results, the measured exhaust gas component values are sequentially written into the confirmation sample sequence according to the exhaust gas component order and original sampling location order that are completely consistent with the current exhaust gas sequence. This ensures that the confirmation sample sequence and the segmented prediction results are within the same original sampling location framework. Subsequently, the segment type, segment number, start sampling number, end sampling number, and boundary position marker already saved in the segmented prediction results are read. The confirmation sample sequence is then segmented sequentially along the original sampling location order. For any segment type that corresponds to a continuing prediction segment, the corresponding sampling segment is extracted from the confirmation sample sequence to form a confirmed continuing segment. For any segment type that corresponds to a local prediction segment, the corresponding sampling segment is extracted from the confirmation sample sequence to form a confirmed new variation segment. This ensures that the confirmed continuing segment and the continuing prediction segment correspond one-to-one in terms of start sampling number and end sampling number, and the confirmed new variation segment also corresponds one-to-one with the local prediction segment. Subsequent verification always proceeds along the aforementioned fixed boundaries without re-dividing the segment range.
[0071] S402: Calculation of component sequence consistency rate.
[0072] After confirming the formation of a new variable segment, for each local predicted segment and its corresponding confirmed new variable segment, the analysis window boundaries fixed in step S2 are used to simultaneously divide the local predicted segment and the confirmed new variable segment into analysis windows. Within each analysis window, the window component sum of each exhaust gas component in the local predicted segment is calculated, and the total component sum of all exhaust gas components within the same analysis window is calculated. Then, the window component sum is divided by the total component sum to obtain the predicted component proportion of the local predicted segment in the current analysis window. The confirmed new variable segment is processed in the same way to obtain the confirmed component proportion. Subsequently, all exhaust gas components are arranged in descending order of predicted component proportion and confirmed component proportion. When the component proportions are the same, the components are separated into different proportions. Under the condition of stable sorting according to the preset exhaust gas component order, a predicted component sequence string and a confirmed component sequence string are formed. After the predicted component sequence string and the confirmed component sequence string are formed, the order relationship of any two exhaust gas components in the predicted component sequence string is examined one by one to see if they are consistent with their order relationship in the confirmed component sequence string. Exhaust gas component pairs with consistent order relationships are recorded as consistent component pairs, and exhaust gas component pairs with inconsistent order relationships are recorded as inconsistent component pairs. Then, the number of consistent component pairs is divided by the total number of exhaust gas component pairs to obtain the sequence consistency value of the current analysis window. After the same processing is completed for all analysis windows, the sequence consistency value of each analysis window is averaged according to the number of analysis windows to obtain the component sequence consistency rate corresponding to the current local predicted segment. The component sequence consistency rate reflects the degree of agreement between the local predicted segment and the confirmed new variable segment in terms of the relative structure of multiple components. The higher the aforementioned value, the higher the degree of preservation of the subsequent measured structural relationship by the local predicted segment.
[0073] S403: Calculation of historical capacity envelope placement rate.
[0074] After the component sequence consistency rate is formed, the historical containment envelope placement rate is calculated for the same local predicted segment and the same confirmed new variable segment. First, the historical containment envelope established in step S2 for the corresponding new variable feature segment is read. The historical containment envelope saves the lower and upper envelopes for each analysis window and exhaust gas component, so it is directly used in step S4. Then, the confirmed new variable segment is divided into analysis windows according to the analysis window boundaries that are completely consistent with step S2, and the window mean is calculated for each exhaust gas component in each analysis window. After the window mean is formed, the window mean of the current exhaust gas component is compared with the historical containment envelope of the corresponding analysis window and the corresponding exhaust gas component. If the window mean is between the lower and upper envelopes, the current exhaust gas component is recorded as having a valid location. If the window mean is lower than the lower envelope or higher than the upper envelope, the current exhaust gas component is recorded as having a invalid location. Then, the number of exhaust gas components with valid locations in the current analysis window is divided by the total number of exhaust gas components to obtain the envelope location value of the current analysis window. After the same processing is completed for all analysis windows, the envelope location values of each analysis window are averaged according to the number of analysis windows to obtain the historical containment envelope location rate corresponding to the current local prediction segment. The aforementioned historical containment envelope placement rate is used to characterize whether the confirmed new variant fragment is still within the local containment range identified in step S2 at the amplitude level. The higher the value, the closer the current new variant is to the stable retention state identified in step S2 in terms of amplitude performance.
[0075] S404: Segment consistency verification and pass mark formation.
[0076] Once the component sequence consistency rate and the historical containment envelope placement rate have been obtained, segment consistency verification is performed on the current local predicted segment. Specifically, the sequence verification threshold and placement verification threshold are first read. The sequence verification threshold is derived from the cross-validation boundary result of the component sequence consistency rate between the confirmed new variable segment sample and the corresponding confirmed new variable segment during the training phase. The placement verification threshold is derived from the cross-validation boundary result of the historical containment envelope placement rate between the confirmed new variable segment sample and the corresponding confirmed new variable segment during the training phase. For example, the sequence verification threshold is set to 0.75 to 0.90, and the placement verification threshold is set to 0.60 to 0.85. The final values are determined based on minimizing the overall color difference on the validation set and controlling the misclassification rate. Subsequently, the component sequence alignment rate of the current local predicted segment is compared with the sequence verification threshold one by one, and the historical envelope placement rate of the current local predicted segment is compared with the placement verification threshold one by one. When both comparisons are satisfied, the current local predicted segment is marked as having passed the segmental consistency verification and a pass mark is generated. When either comparison is not satisfied, the current local predicted segment is marked as having failed the segmental consistency verification, and a corresponding pass mark is generated. The pass mark does not compress the two types of verification results into a single empirical score, but requires that the consistency relationship at the component structure level and the placement relationship at the amplitude boundary level be established simultaneously. Therefore, it can directly reflect whether the current new changes are suitable as reference information for subsequent batches to be written back to the historical reference sequence.
[0077] S405: Stage reference subsequence writing, new variant fragment sample domain prototype center update and isolated sample transfer.
[0078] After the marking is formed, each new variant feature fragment is processed segment by segment. If the segment consistency verification is passed by the marking indication, the fermentation stage number saved in step S2 is read first to determine the fermentation stage to which the currently confirmed new variant fragment belongs. Then, the stage reference subsequence corresponding to the fermentation stage is taken from the historical reference sequence, and the currently confirmed new variant fragment is appended to the end of the stage reference subsequence in the original sampling position order to form an updated stage reference subsequence. The updated stage reference subsequence replaces the original corresponding stage content. Subsequently, the staged mirror dual-domain learning model corresponding to the fermentation stage in step S2 is read, and the historical sequence position regression and historical envelope escape residence corresponding to the current new variant feature fragment are input. The shared feature mapping corresponding to the fermentation stage is used to obtain the current new variant fragment mapping vector. Then, the current new variant fragment mapping vector is recursively incorporated into the prototype center of the new variant fragment sample domain corresponding to the fermentation stage to form the updated prototype center of the new variant fragment sample domain. The specific recursive processing method is as follows: the number of new variant fragment samples already included before the update is used as the cumulative base. The prototype center of the new variant fragment sample domain before the update is expanded proportionally according to the cumulative base. Then, the current new variant fragment mapping vector is added to it. Finally, the total number of samples after adding one to the cumulative base is normalized to obtain the updated prototype center of the new variant fragment sample domain.
[0079] If the segment consistency verification fails via a marker, the corresponding new variable feature segment, the corresponding confirmed new variable segment, the corresponding component sequence consistency rate, and the corresponding historical containment envelope placement rate are encapsulated as isolated samples with the same segment number and written into the isolated sample library. These isolated samples are not written into the stage reference subsequence, nor do they participate in the update of the prototype center of the new variable segment sample domain. Thus, step S4 completes the confirmation screening, controlled write-back, and isolated transfer of the segment prediction results from step S3. This ensures that when subsequent batches execute steps S1, S2, and S3 again, the historical reference sequence and the staged mirror dual-domain learning model introduce verified new change information, rather than unverified transient disturbance information.
[0080] After step S4 is completed, the component order consistency relationship and historical containment envelope position relationship between the local predicted fragments and the confirmed new variant fragments have been verified. New variant feature fragments that meet the verification conditions are included in the historical reference sequence of the corresponding fermentation stage and enter the update process of the phased mirror dual-domain learning model. New variant feature fragments that do not meet the verification conditions are transferred to the isolation sample. At this point, the write-back objects and isolation objects in the aforementioned online prediction link are clearly separated. The historical basis only accepts confirmed new variant fragments, and the fragment information generated during online operation is thus precipitated into continuously accumulated reference content.
[0081] Specifically, the above are merely preferred embodiments of this application and are not intended to limit this application.
[0082] In the description of this specification, references to terms such as "an embodiment," "example," and "specific example" indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0083] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention.
Claims
1. A self-learning online prediction method for fermentation exhaust gas composition data, characterized in that, Including the following steps: S1. Write the continuously collected multi-component data of fermentation tail gas into the current tail gas sequence according to the sampling time sequence, and establish a corresponding comparison sequence based on the historical reference sequence. Use a continuous analysis window to extract the combination of the change direction of each tail gas component relative to the previous continuous analysis window. After comparing window by window, merge the continuous analysis windows that do not meet the consistency relationship into change candidate segments. S2. Extract the corresponding historical aligned segments for the candidate segments of change, and divide the analysis window separately. Generate the component sequence string according to the component proportion, calculate the historical sequence regression amount and the historical envelope escape residence amount, input the two into the staged mirror dual-domain learning model to obtain the new change retention coefficient, and divide the candidate segments of change into new change feature segments or regression segments according to the new change retention coefficient to form the inherited feature set and the new change feature set. S3. Divide the inherited feature set into inherited segments according to the original position in the current exhaust gas sequence, and perform historical prediction mapping based on the historical reference sequence to obtain the continued prediction segment. Then, divide the new variable feature set into new variable segments according to the original position, and perform local prediction mapping based on the connecting transition data and the connection end of the adjacent continued prediction segment to obtain the local prediction segment. Then, backfill according to the original position to form the segmented prediction result. S4. After obtaining the confirmed samples corresponding to the segmented prediction results, the segments are synchronously divided according to the segment boundaries in the segmented prediction results to obtain confirmed continuation segments and confirmed new change segments. The segmented consistency verification is performed on the local prediction segments and the corresponding confirmed new change segments. The new change feature segments that pass the verification are written into the historical reference sequence, and the new change feature segments that fail the verification are transferred to the isolation samples.
2. The self-learning online prediction method for fermentation tail gas component data according to claim 1, characterized in that, Step S1 includes: First, rearrange the current exhaust gas sequence and the historical reference sequence according to the same exhaust gas component order and the same sampling interval. Then, establish the historical alignment number based on the cumulative change path between adjacent sampling positions of each exhaust gas component after reference amplitude normalization, and extract the corresponding sampling value from the historical reference sequence according to the historical alignment number to form a comparison sequence.
3. The self-learning online prediction method for fermentation tail gas component data according to claim 2, characterized in that, Step S1 also includes: A continuous analysis window is set along the current exhaust gas sequence, and the direction ratio of each exhaust gas component in the current exhaust gas sequence and the comparison sequence in two adjacent continuous analysis windows is calculated respectively. Then, the change direction value is generated according to the direction resolution threshold. The inconsistent window is determined by the consistency ratio of the change direction values of each exhaust gas component, and the inconsistent windows with an interval not exceeding the connection threshold are merged to form change candidate segments.
4. The self-learning online prediction method for fermentation tail gas component data according to claim 1, characterized in that, Step S2 includes: For each candidate segment of change, historical aligned segments, left transition data, and right transition data are extracted. The proportion of each exhaust gas component in the corresponding analysis window is calculated according to the same analysis window boundary. Then, the component sequence strings of the candidate segment of change analysis window, historical aligned segment analysis window, left transition analysis window, and right transition analysis window are generated according to the size of the component proportion.
5. The self-learning online prediction method for fermentation tail gas component data according to claim 4, characterized in that, Step S2 also includes: First, the transition inversion pair set is extracted from the left and right transition analysis windows. Then, the component sequence string of the change candidate fragment analysis window is compared with the component sequence string of the corresponding historical aligned fragment analysis window to obtain the window inversion pair set. The historical sequence regression amount is determined by the proportion of the analysis window included in the transition inversion pair set. The historical containment envelope is established by the historical aligned fragment and transition data to determine the historical envelope escape and residence amount.
6. The self-learning online prediction method for fermentation tail gas component data according to claim 5, characterized in that, Step S2 also includes: Based on the distribution of the landing points of the alignment index set in the historical reference sequence, the fermentation stage to which the candidate change fragment belongs is determined. The historical sequence regression quantity and the historical envelope escape retention quantity are input into the phased mirror dual-domain learning model of the corresponding fermentation stage to obtain the new change retention coefficient. Then, the candidate change fragment is divided into new change feature fragments or regression fragments according to the new change retention coefficient.
7. The self-learning online prediction method for fermentation tail gas component data according to claim 1, characterized in that, Step S3 includes: First, the inherited feature set is segmented according to the original sampling position to obtain the inherited sub-segments. Then, the historical alignment numbers of the start and end sampling numbers of the corresponding inherited sub-segments are read from the full position historical alignment sequence as the first and last anchor points of the inherited sub-segments. The inheritance process ratio is established based on the cumulative change path after reference amplitude normalization within the inherited sub-segments. The historical mapping position is generated using the inheritance process ratio to form the continuous prediction segment.
8. The self-learning online prediction method for fermentation tail gas component data according to claim 7, characterized in that, Step S3 also includes: The new variable feature set is segmented according to the original sampling position to obtain new variable segments. The left transition data, right transition data and the connection end of the adjacent continuous prediction segment connected to the new variable segment are read. The change rate of the left and right boundaries is determined based on the mean of the last position of the left transition, the mean of the first position of the right transition and the corresponding boundary prediction value. Then, the new variable morphology process ratio is generated based on the cumulative change path inside the new variable segment, and the local prediction segment is formed by segmented cubic Hermit interpolation.
9. The self-learning online prediction method for fermentation tail gas component data according to claim 1, characterized in that, Step S4 includes: After obtaining measured exhaust gas component values at all original sampling locations covered by the segmented prediction results, a confirmed sample sequence is generated. The sequence is then synchronously divided into confirmed continuation segments and confirmed new variation segments according to the segment boundaries in the segmented prediction results. The component sequence consistency rate between the local predicted segments and the confirmed new variation segments, as well as the placement rate of the confirmed new variation segments relative to the historical containment envelope, are calculated along the analysis window boundaries used in step S2.
10. The self-learning online prediction method for fermentation tail gas component data according to claim 9, characterized in that, Step S4 also includes: The component sequence consistency rate is compared with the sequence verification threshold, and the placement rate is compared with the placement verification threshold. When both comparisons are satisfied, the corresponding confirmed new variant fragment is added to the corresponding stage reference subsequence according to its fermentation stage, and the mapping result of the corresponding new variant feature fragment is recursively merged into the prototype center of the new variant fragment sample domain of the corresponding fermentation stage. When either comparison is not satisfied, the corresponding new variant feature fragment and the corresponding confirmed new variant fragment are transferred to the isolated sample.