Method for heavy metal transformation process and trend prediction based on reaction kinetics model
By introducing time-incrementing markers and sequential numbers into heavy metal monitoring data, and constructing sequential offset trajectories and reverse change segment identifiers, the problem of sequential misalignment in the storage of heavy metal data is solved, ensuring the temporal consistency of the heavy metal conversion process and the accuracy of trend prediction.
Patent Information
- Application Number
- CN202610312168.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-16
- Publication Date
- 2026-07-10
AI Technical Summary
In the storage of continuous heavy metal monitoring data using existing technologies, abnormal situations can easily lead to data sequence misalignment, affecting the accuracy of predicting heavy metal morphological change trends and the accuracy of environmental control decisions.
By introducing time-incrementing markers and sequential numbers into the monitoring data, a dual expression mechanism is formed. After compression and storage, sequential offset trajectories and reverse change segment identifiers are constructed to ensure the accuracy of the chronological relationship of the data records. Abnormal segments are repaired through progressive recovery processing.
To ensure that the analysis of heavy metal conversion processes is always based on real time series, improve the temporal consistency and logical stability of trend prediction, and enhance the reliability of trend prediction results and the accuracy of risk assessment.
Smart Images

Figure CN122367693A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of environmental pollution control technology, specifically to a method for predicting the conversion process and trends of heavy metals based on reaction kinetic models. Background Technology
[0002] Heavy metal transformation process and trend prediction based on reaction kinetic models refers to constructing kinetic expressions that conform to actual reaction mechanisms in environmental media such as soil, water bodies, or sediments, focusing on the transformation behavior of heavy metal elements between different chemical forms. This involves characterizing the rate constants, reaction orders, and influencing factors of reactions such as redox, complexation, precipitation, adsorption, and desorption, incorporating the time variable into the transformation path analysis, and establishing a functional relationship between the proportion of heavy metal forms and time. Based on this, environmental condition parameters (such as temperature, pH, dissolved oxygen concentration, and organic matter content) are combined to correct and couple the reaction rates, forming a mathematical prediction framework that can describe the migration, enrichment, or stabilization trends of heavy metals under specific environmental conditions. This allows for the quantitative extrapolation of future heavy metal concentration distribution, changes in toxicity risk, and the characteristics of transformation rate stages. The core of this method lies in using reaction rate control mechanisms as a starting point, revealing the dynamic laws of pollution evolution through continuous calculations over time, rather than relying solely on empirical judgments based on static concentration monitoring results.
[0003] The existing technology has the following shortcomings: In existing technologies, when storing and compressing continuous heavy metal monitoring data, batch packaging and index reconstruction are commonly used to reduce storage burden. However, in cases of abnormal power outages, cache overflows, or abnormal compression algorithm execution, record order reordering can easily occur, causing data originally arranged chronologically to become misaligned and disrupting the temporal progression. Since the data values themselves do not show obvious abnormalities, the system often struggles to identify such hidden errors in subsequent calls. The model may then infer changes in heavy metal morphology based on the incorrect time sequence, leading to reverse transformation path judgments. This can easily cause a reversal in trend prediction, resulting in a severe underestimation of risk levels and affecting the accuracy of subsequent environmental control decisions.
[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide a method for predicting the conversion process and trend of heavy metals based on a reaction kinetic model, so as to solve the problems in the background art mentioned above.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for predicting the conversion process and trend of heavy metals based on a reaction kinetic model, comprising the following steps: To collect continuous monitoring data required for the prediction of heavy metal conversion processes and trends, time-series data records are generated. When each time-series data record is generated, a time increment marker is extracted, and a sequence number is written at the end of each time-series data record to indicate the actual order of generation. The sequence number is extracted from the time-series data records after compression and compared with the sequence number in the time-series data records before compression, forming a sequence offset trajectory in the time-series data record sequence to characterize the change in the time sequence relationship; Based on the sequential offset trajectory, the change direction of the time increment mark is analyzed segment by segment to identify abnormal segments where the sequential number continues to increase while the time increment mark regresses. Reverse change segment markers are formed at the corresponding positions of the abnormal segments to limit the range of sequence disorder. Based on the reverse change segment identifier, trace back the corresponding sequence number record, sort out the intersecting segments between the actual generation order and the current storage order, extract the time range corresponding to the intersecting segment, and set the order adjustment entry at the corresponding position of the time range. A progressive sequence restoration process is performed on the interleaved sections around the sequence adjustment entry point. Within the interleaved sections, the time sequence data records are rearranged one by one according to the sequence number, and the time increment markers are released according to the actual order of generation, so that the time progression direction is consistent with the actual order of generation.
[0007] The preferred time-incrementing marker extraction steps are as follows: Collect continuous monitoring data to form time-series data records. When each time-series data record is generated, extract the time increment marker and write the time increment marker into a fixed field position. Generate a sequence number corresponding to the time-series data record. The sequence number is arranged in ascending order according to the actual order of generation and written to the end field position of the time-series data record, so that the time increment mark and the sequence number form a one-to-one correspondence. During continuous monitoring, the extraction of time increment markers and the writing of sequence numbers are continuously performed, so that the time sequence data records simultaneously present the time increment marker progression path and the sequence number progression path. The time-series data records containing time increment markers and sequence numbers are submitted to the storage and compression process to maintain the correspondence between time increment markers and sequence numbers, which is used for subsequent sequence offset trajectory formation and progressive sequence recovery processing.
[0008] Preferably, the sequential offset trajectory formation steps are as follows: Read the compressed, time-series data records, extract the sequence number from the end of each time-series data record, and register them according to the current storage order to form the first sequence number sequence; Retrieve the time-ordered data records arranged according to their actual generation sequence before compression, extract the corresponding sequence numbers to form a second sequence number sequence, and arrange the first and second sequence number sequences side by side with the current storage position as the index reference. Record the numerical differences between the first and second sequential numbering sequences at the same index position to form an offset numerical sequence, and arrange them continuously according to the index order; Based on the offset value sequence, the corresponding offset values are connected in the time sequence data record to form a sequential offset trajectory, and the sequential offset trajectory is saved in correspondence with the time sequence data record.
[0009] Preferably, the offset value sequence is arranged continuously according to the index position in the current storage order, and the sequential offset trajectory is connected by the correspondence of the offset value sequence to form a continuous change path. The sequential offset trajectory maintains a one-to-one correspondence with the time sequence data record and is used to identify the time sequence change section during the compressed storage process.
[0010] Preferably, the steps for forming the reverse change segment identifier are as follows: Read the time-series data records bound to the sequential offset trajectory, extract the sequence number and time increment marker one by one according to the current storage order, and construct a continuous control sequence; By comparing the changes in the sequential numbering and the changes in the time increment markers of adjacent time-series data records in a continuous control sequence, the index position where the sequential numbering remains incremented and the time increment markers regress is determined. Continue to perform the judgment of changes in sequence number and time increment mark along the current storage order, and define the range of abnormal segments where the sequence number remains incremented and the time increment mark has rolled back; Write reverse change segment identifiers at the start and end index positions of the abnormal segment, and associate the reverse change segment identifiers with the sequence offset trajectory to limit the range of sequence disorder.
[0011] Preferably, the range of abnormal segments is recorded synchronously based on the sequential number interval and the time increment mark interval, and the index correspondence is maintained in the current storage order. The reverse change segment identifier contains sequential number interval information and time increment mark interval information, which is used to define continuous segments where the sequential number keeps increasing and the time increment mark rolls back.
[0012] Preferably, the steps for setting the sequential entry are as follows: Based on the reverse change segment identifier, determine the start and end index positions of the abnormal segment, read the corresponding time sequence data records and extract the sequence number and time increment marker to form the current storage order list; Retrieve the chronological data records of the actual occurrence order, locate the position of the sequence number within the abnormal segment in the actual occurrence order, and construct a dual position mapping relationship; Reorder the time-sequence data records within the abnormal segment according to their actual order of generation, and identify the overlapping sections between the current storage order and the actual order of generation. Extract the time increment markers corresponding to the interlaced segments to form a time range, and set the order adjustment entry at the starting index position of the interlaced segment corresponding to the time range for progressive order recovery processing.
[0013] Preferably, a progressive sequence restoration process is performed on the interleaved sections around the sequence adjustment entry point. Within the interleaved sections, the time sequence data records are rearranged one by one according to the increasing sequence number, and the time increment markers are released sequentially according to the actual order of generation. The steps are as follows: The starting and ending index positions of the interlaced segment corresponding to the positioning sequence are adjusted. The time sequence data records inside the interlaced segment are read and the sequence number and time increment mark are extracted to form an interlaced segment record list. Arrange the list of records in the intersecting sections according to the ascending sequential numbering, and then locate the time-sequential data records in the actual order of generation in the list to the corresponding index position of the order adjustment entry for rearrangement. Insert chronologically ordered data records one by one into the list arranged in the actual order of their generation, adjust the arrangement position within the interleaved section, and keep the external index position of the interleaved section unchanged; Based on the actual order of their generation, the time increment markers within the interleaved section are continuously released and connected with the time sequence data records outside the interleaved section to restore the consistent direction of time progression.
[0014] The technical effects and advantages provided by the present invention in the above technical solution are as follows: This invention introduces a dual expression mechanism of time-incrementing markers and sequential numbering during the continuous monitoring phase, and constructs sequential offset trajectories and reverse change segment identifiers after compressed storage. This ensures that time-series data records can accurately restore the true order of generation even when the storage structure changes, guaranteeing the continuity of the temporal progression from the source. By limiting the range of sequence disorder at the segment level and performing gradual restoration processing, the invention prevents temporal logical confusion from spreading to the overall data sequence, thereby ensuring that the analysis of the heavy metal conversion process is always based on the true time series, improving the temporal consistency and logical stability of the trend extrapolation process.
[0015] This invention establishes a clear starting boundary and control range for the repair process of abnormal segments by setting an entry point for sequential adjustment and rearranging the time sequence data records one by one within the interlaced sections. This allows for the restoration of the time progression direction without altering the normal segment arrangement. By releasing the correspondence between the time increment markers and the sequence numbers, the restored time series maintains consistency with the actual generation order, thereby preventing the dynamic model from making reverse path judgments during the extrapolation process and improving the reliability of trend prediction results and the accuracy of risk assessment decisions. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0017] Figure 1 This is a flowchart of the method for predicting the conversion process and trend of heavy metals based on a reaction kinetic model, as described in this invention. Detailed Implementation
[0018] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the description of this disclosure will be more complete and fully convey the concept of the exemplary embodiments to those skilled in the art.
[0019] This invention provides, for example Figure 1 The method for predicting the conversion process and trend of heavy metals based on a reaction kinetic model, as shown, includes the following steps: To collect continuous monitoring data required for the prediction of heavy metal conversion processes and trends, time-series data records are generated. When each time-series data record is generated, a time increment marker is extracted, and a sequence number is written at the end of each time-series data record to indicate the actual order of generation. The continuously generated monitoring data undergoes full-process time constraint processing, ensuring that each time-series data record completes the extraction of time increment markers and the writing of sequence numbers at the moment of generation. This solidifies the true chronological order of data generation from the data source and lays the data foundation for subsequent sequence offset analysis and sequence recovery processing. The specific implementation steps are as follows: During continuous monitoring, heavy metal-related parameters in the target environmental medium are collected at fixed sampling intervals. Each collection triggers a record generation action, forming a complete time-series data record. The time-series data record includes the total heavy metal concentration, concentration of each form, ambient temperature, ambient pH, dissolved oxygen concentration, and organic matter content at the time of collection. At the moment of record generation, the time scale value output by the internal time source of the current monitoring equipment is read synchronously, and this time scale value is written as a time increment marker into a fixed field position in the time-series data record. The time increment markers are arranged in ascending order according to the time occurrence, forming a unidirectional progressive time scale sequence during continuous collection. During the writing process, the time increment markers maintain their original precision without truncation or rounding, ensuring that the time-series data record has complete time information expression from the generation stage.
[0020] After the time increment marker is written, a sequence number is generated synchronously during the generation of each time-series data record to ensure a consistent actual order. The sequence numbers are consecutively incremented by integers starting from the initial monitoring time. The first time-series data record corresponds to the initial sequence number. For each subsequent time-series data record, the sequence number is incremented by a fixed step value. The sequence number is directly written to the end field of the time-series data record after generation, making it an integral part of the record. The time increment marker and the sequence number are written at the same generation time and maintain a one-to-one correspondence, ensuring that any sequence number corresponds to a unique time increment marker, and any time increment marker corresponds to a unique sequence number, thus forming a dual-sequence structure within the time-series data record.
[0021] During continuous monitoring, the extraction of time increment markers and the writing of sequence numbers are continuously performed, so that the time-series data records present two progressive paths at the logical arrangement level: the first progressive path is composed of time increment markers, reflecting the actual time scale changes; the second progressive path is composed of sequence numbers, reflecting the actual order of generation. During the continuous generation phase, the time increment markers and sequence numbers maintain a synchronous growth relationship, that is, the time increment marker value corresponding to the later generated time-series data record is greater than the time increment marker value of the previous record, and the sequence number value is greater than the sequence number value of the previous record. After each time-series data record is written, it immediately enters the storage buffer queuing state, and the queuing order is arranged in the ascending direction of the sequence number, so that the time-series data records have completed the time logical constraints before entering the subsequent storage processing.
[0022] After the dual-sequence structure is formed, the time-sequence data records containing time-incrementing markers and sequence numbers are submitted to the storage and compression processing flow. Throughout the monitoring period, the extraction of time-incrementing markers and the writing of sequence numbers are continuously repeated, ensuring that all subsequently generated time-sequence data records construct a dual-sequence structure according to the same rules. By maintaining a fixed correspondence between time-incrementing markers and sequence numbers, the time-sequence data records within any time period can be restored to their true order of generation through sequence numbers, and the direction of time scale change can be presented through time-incrementing markers. Under this structure, the time-sequence data records retain a dual progressive expression in the subsequent storage, compression, transmission, and retrieval stages, locking in the true time progression relationship from the data source. This provides a continuous and complete data foundation for the subsequent formation of sequence offset trajectories, identification of reverse change segments, and gradual sequence recovery processing based on sequence numbers, and ensures that the heavy metal conversion process and trend prediction are always based on the true time progression framework.
[0023] The sequence number is extracted from the time-series data records after compression and compared with the sequence number in the time-series data records before compression, forming a sequence offset trajectory in the time-series data record sequence to characterize the change in the time sequence relationship; By mapping and unfolding the chronological data records before and after compression, the compressed chronological data records maintain a line-by-line correspondence with the actual order of their creation before compression. Furthermore, a continuously expressible sequence offset trajectory is formed during the continuous arrangement process, thereby revealing the changing state of the chronological order. The specific implementation steps are as follows: After the compression and storage process is completed, all time-series data records are read sequentially according to the current storage order. The sequence number field written at the end of each time-series data record is extracted one by one, and the extracted sequence numbers are registered sequentially according to the current storage arrangement to form a first sequence number sequence. The first number in the first sequence number sequence corresponds to the first time-series data record in the current storage order, the second number corresponds to the second time-series data record in the current storage order, and so on until the last time-series data record, thus completely reflecting the arrangement of time-series data records after compression and storage. After the first sequence number sequence is formed, the list of time-series data records arranged continuously according to the actual generation order before compression is retrieved, and the sequence number field is extracted sequentially from the list and arranged according to the actual generation order to form a second sequence number sequence, so that the second sequence number sequence completely expresses the actual generation order before compression.
[0024] After the first and second sequential number sequences are formed, the arrangement position of the time-ordered data records in the current storage order is used as a unified index benchmark. The two sets of sequential numbers are arranged side by side according to the same index position. That is, the sequential numbers with index position one in the first sequential number sequence are arranged to correspond with the sequential numbers with index position one in the second sequential number sequence, and the sequential numbers with index position two are arranged to correspond with the sequential numbers with index position two. This process is continued until all index positions are arranged. During the arrangement process, the numerical difference between each pair of sequential numbers is recorded. The number of the first sequential number sequence at the corresponding index position is subtracted from the number of the second sequential number sequence at the same index position to obtain the offset value of the current position. All offset values are recorded continuously according to the index order, thus forming an offset value sequence covering all time-ordered data records. The offset value sequence reflects the offset state of the time-ordered data records after compression and storage relative to the actual order of generation at the current position.
[0025] After the offset value sequence is formed, the index positions of the time-series data records in the current storage order are used as the basis for horizontal arrangement, and the offset values of the corresponding index positions are used as the basis for vertical change. The offset values corresponding to each index position are connected sequentially, so that each record in the time-series data record sequence corresponds to an offset value, and a continuous change trajectory is formed between consecutive index positions. This change trajectory is the sequential offset trajectory. The direction of the sequential offset trajectory is completely determined by the offset value sequence. When the offset values between consecutive index positions remain the same, the sequential offset trajectory extends horizontally; when the offset values between consecutive index positions increase, the sequential offset trajectory extends upward; when the offset values between consecutive index positions decrease, the sequential offset trajectory extends downward. By recording the continuous direction of the sequential offset trajectory, the arrangement relationship of the time-series data records before and after compressed storage is completely expressed in a traceable form.
[0026] After the sequential offset trajectory is formed and corresponds one-to-one with the time-series data records, the sequential offset trajectory is bound and saved to the corresponding time-series data records. This allows the position of each time-series data record in the current storage order to be traced back to its corresponding position in the actual order of generation through the offset value. In subsequent processing stages, the sequential offset trajectory serves as the basis for expressing the changing state of the time sequence. The changes in the offset values of continuous index positions reflect whether the record order was rearranged during the compressed storage process and the location of the rearranged segment. By maintaining a stable correspondence between the first sequence numbering sequence, the second sequence numbering sequence, and the sequential offset trajectory, the time-series data records after compressed storage can be completely mapped to the actual order of generation before compression processing. This provides a continuous and complete data foundation for subsequent abnormal segment identification and order recovery processing based on the sequential offset trajectory.
[0027] Based on the sequential offset trajectory, the change direction of the time increment mark is analyzed segment by segment to identify abnormal segments where the sequential number continues to increase while the time increment mark regresses. Reverse change segment markers are formed at the corresponding positions of the abnormal segments to limit the range of sequence disorder. Based on the established sequence offset trajectories that correspond one-to-one with the time-series data records, the direction of change of the time increment marker under the current storage order is continuously segmented. By synchronously comparing the change state of the sequence number with the change state of the time increment marker, abnormal segments where the sequence number continues to increase while the time increment marker regresses are identified. Reverse change segment markers are formed at the corresponding positions of the abnormal segments, thereby limiting the scope of the sequence disorder. The specific implementation steps are as follows: After the sequential offset trajectory and the time-series data records are bound together, each time-series data record is read sequentially from the index position onwards according to its arrangement index in the current storage order, while retrieving the corresponding sequence number and time increment flag fields. The time-series data record at index position one is used as the starting reference record, and its sequence number value and time increment flag value are recorded. Then, the time-series data record at index position two is read, and its sequence number value and time increment flag value are recorded respectively. During the continuous reading process, a comparison relationship is established for each pair of adjacent time-series data records, so that the sequence number value of the later time-series data record and the sequence number value of the earlier time-series data record form a set of comparison objects, and the time increment flag value of the later time-series data record and the time increment flag value of the earlier time-series data record form another set of comparison objects, thereby constructing a continuous comparison sequence.
[0028] After the continuous control sequence is formed, segment-by-segment analysis is performed on each pair of adjacent time-series data records. For any pair of adjacent time-series data records, firstly, it is determined whether the sequence number of the subsequent time-series data record is greater than the sequence number of the preceding time-series data record. If the sequence number of the subsequent time-series data record is greater than the sequence number of the preceding time-series data record, it is determined that the sequence number remains in an increasing state. Under the premise that the sequence number remains in an increasing state, it is further determined whether the time increment mark value of the subsequent time-series data record is less than the time increment mark value of the preceding time-series data record. If the time increment mark value of the subsequent time-series data record is less than the time increment mark value of the preceding time-series data record, it is determined that the time increment mark has rolled back. When both of the above conditions are met, the index position of the current and subsequent time-series data records is recorded as the starting candidate position of the abnormal segment, and the analysis continues to proceed in the continuous analysis process.
[0029] After determining the candidate starting position of the abnormal segment, the subsequent time-series data records are read one by one along the current storage order. For each time-series data record, the change status of the sequence number and the change status of the time increment mark are repeatedly judged. When the sequence number value of the subsequent time-series data record is continuously greater than the sequence number value of the previous time-series data record, and the time increment mark value is continuously less than the time increment mark value of the previous time-series data record, the entire continuous segment is included in the same abnormal segment range. When a time-series data record is read, and its time increment mark value is greater than the time increment mark value of the previous time-series data record, and this time increment mark value is greater than the time increment mark value of the time-series data record before the candidate starting position of the abnormal segment, this position is determined as the end position of the abnormal segment. By continuously recording the candidate starting position and the end position of the abnormal segment, the segment where the sequence number continues to increase while the time increment mark regresses is completely delineated.
[0030] After determining the range of abnormal segments, a starting marker for the reverse change segment is written at the starting index position of the abnormal segment, and an ending marker for the reverse change segment is written at the ending index position of the abnormal segment. The corresponding sequence number interval and time increment marker interval are recorded in the reverse change segment identifier to maintain an index correspondence between the reverse change segment identifier and the time sequence data record. The reverse change segment identifier is associated with the sequence offset trajectory so that the directional change of the corresponding segment in the sequence offset trajectory can correspond consistently with the reverse change segment identifier. Through the above processing, all abnormal segments in the time sequence data record sequence where the sequence number keeps increasing while the time increment marker rolls back are accurately identified, and the range of sequence disorder is limited at the index position level, thus providing clear segment boundaries for subsequent cross-segment sorting and progressive sequence recovery processing based on the reverse change segment identifier.
[0031] Based on the reverse change segment identifier, trace back the corresponding sequence number record, sort out the intersecting segments between the actual generation order and the current storage order, extract the time range corresponding to the intersecting segment, and set the order adjustment entry at the corresponding position of the time range. Based on the identification and marking of the reverse change sections, a bidirectional backtracking process is performed on the time-series data records within the disordered area. This reveals the overlapping sections between the actual generation order and the current storage order, and sequence adjustment entry points are set within the corresponding time ranges of these overlapping sections. This provides a clear starting point and section boundaries for subsequent gradual sequence restoration processing. The specific implementation steps are as follows: Based on the start and end index positions of the abnormal segments recorded in the reverse change segment identifier, all time-series data records of this segment are located in the current storage order, and read one by one from the start index position to the end index position according to the current storage order. During the reading process, the sequence number and time increment mark value of each time-series data record are extracted, and the sequence numbers are arranged into a first numbered list according to the current storage order. Then, the list of time-series data records arranged continuously according to the actual generation order before compression is retrieved, and the corresponding sequence number is extracted from the list one by one, and the arrangement position of each sequence number in the actual generation order is recorded. By locating the sequence numbers in the abnormal segments one by one in the actual generation order list, each time-series data record obtains two positional attributes at the same time: the index position in the current storage order and the arrangement position in the actual generation order, thus forming a dual positional mapping relationship.
[0032] After the dual-position mapping relationship is established, all time-series data records within the abnormal segment are reordered according to their actual generation order, and a list of actual generation order is generated. Then, the list of actual generation order is compared line by line with the index arrangement in the current storage order, comparing the index position of each time-series data record in the current storage order with its actual generation order position. When the actual generation order position of a time-series data record is inconsistent with its index position in the current storage order, that time-series data record is marked as an interleaved record. During continuous comparison, interleaved records with consecutive indices in the current storage order but exhibiting a jump distribution in the actual generation order are merged into the same interleaved segment, thus completely clarifying the interleaved relationship between the actual generation order and the current storage order within the abnormal segment.
[0033] After the interleaved sections are sorted out, the time increment marker values of each time-series data record within the interleaved section are extracted, and the time range is determined according to the actual order of generation. The time increment marker value of the first time-series data record in the interleaved section in the actual order of generation is determined as the starting value of the time range, and the time increment marker value of the last time-series data record in the interleaved section in the actual order of generation is determined as the ending value of the time range. After determining the starting and ending values of the time range, the time range is bound to the index range of the interleaved section in the current storage order, so that the time range and the interleaved section have a one-to-one correspondence, and the index interval corresponding to the time range is recorded in the time-series data record sequence.
[0034] After the time range and interleaved segments are mapped, a sequence adjustment entry is set at the starting index position of the interleaved segment in the current storage order. The start value of the time range, the end value of the time range, and the corresponding sequence number interval are recorded at the sequence adjustment entry position, making the sequence adjustment entry the starting boundary point for the sequence recovery process of the interleaved segment. The sequence adjustment entry exists as a boundary marker in the current storage order, enabling the subsequent progressive sequence recovery process to start from this entry position and rearrange the time-order data records within the interleaved segment according to the actual generation order. Through the above specific implementation process, the sequence disorder range defined by the reverse change segment marker is further refined into interleaved segments between the actual generation order and the current storage order. The time range corresponding to the interleaved segment is completely extracted, and the sequence adjustment entry is set at the corresponding position of the time range, thus forming a continuous, clear, and operable pre-order recovery preparation process.
[0035] A gradual sequence restoration process is performed on the intersecting sections around the sequence adjustment entry point. Within the intersecting sections, the time sequence data records are rearranged one by one according to the sequence number, and the time increment markers are released according to the actual order of generation, so that the time progression direction is consistent with the actual order of generation. With the sequence adjustment entry point already set and corresponding to the starting index position of the interleaved section, a full-process progressive sequence recovery process is performed on the time-series data records within the interleaved section. This rearranges the time-series data records in the current storage order according to their actual generation sequence, and releases the time increment markers one by one during the rearrangement process, ensuring that the time progression direction is consistent with the actual generation sequence. The specific implementation steps are as follows: Using the current storage order index position where the order adjustment entry is located as the recovery starting point, all time-series data records between the starting index position and the ending index position of the interleaved section are read, and the order number and time increment mark of each time-series data record are registered to form an interleaved section record list. After the interleaved section record list is formed, they are arranged in ascending order according to the order number value to form a list of the actual generation order, so that the time-series data records within the interleaved section are logically restored to the actual generation order. After the arrangement is completed, the first time-series data record in the list of the actual generation order is positioned at the index position where the order adjustment entry is located, so that the order adjustment entry becomes the starting connection point for the actual generation order reordering.
[0036] After the first chronologically ordered data record is located, the rearrangement operation is carried out one by one in ascending order of the sequence number in the arrangement list according to the actual order of generation. Specifically, the second chronologically ordered data record in the arrangement list is inserted into the index position after the first chronologically ordered data record, and the arrangement position of the chronologically ordered data records within the original interleaved section in the current storage order is adjusted simultaneously, so that the arrangement order of the second and first chronologically ordered data records in the current storage order is consistent with the actual order of generation. Then, the third chronologically ordered data record in the arrangement list is inserted into the index position after the second chronologically ordered data record, and the insertion continues one by one in ascending order of sequence number, until all chronologically ordered data records in the arrangement list are rearranged in ascending order of sequence number. During the entire insertion process, only the position of the chronologically ordered data records within the interleaved section is adjusted, while the original index positions of the chronologically ordered data records outside the interleaved section remain unchanged.
[0037] After the time-series data records within the interleaved section are rearranged one by one according to their sequential numbers, the time increment markers within the interleaved section are continuously released. In specific execution, the time increment marker value of the first time-series data record in the actual order of generation is used as the starting release value and kept unchanged. Then, the second time-series data record in the arrangement list is read, and its time increment marker value is updated to the next consecutive time scale value that is greater than the time increment marker value of the first time-series data record, so that the time increment markers are arranged in an ascending order in the current storage order. The time increment markers are updated sequentially for the third, fourth, and so on up to the last time-series data record in the arrangement list, so that the time increment marker value of each subsequent time-series data record is greater than the time increment marker value of the previous time-series data record, thereby restoring the continuous time progression direction within the interleaved section.
[0038] After all time-series data records within the interleaved section have undergone sequential number rearrangement and time increment marker release, the end index position of the interleaved section is connected to the next time-series data record outside the interleaved section. Specifically, the time increment marker value of the rearranged last time-series data record is aligned with the time increment marker value of the next time-series data record, ensuring that the time increment marker value of the next time-series data record is greater than the time increment marker value of the last time-series data record within the interleaved section. This ensures that the entire time-series data record sequence forms a continuously increasing time progression direction in the current storage order. After the connection is completed, the rearrangement result within the interleaved section is recorded as a whole, ensuring that the time-series data records within the interleaved section are arranged in the current storage order according to their actual generation order, the time increment markers are continuously released according to their actual generation order, and the time progression direction is consistent with the actual generation order, thus completing the entire process of gradual sequence recovery.
[0039] This invention introduces a dual expression mechanism of time-incrementing markers and sequential numbering during the continuous monitoring phase, and constructs sequential offset trajectories and reverse change segment identifiers after compressed storage. This ensures that time-series data records can accurately restore the true order of generation even when the storage structure changes, guaranteeing the continuity of the temporal progression from the source. By limiting the range of sequence disorder at the segment level and performing gradual restoration processing, the invention prevents temporal logical confusion from spreading to the overall data sequence, thereby ensuring that the analysis of the heavy metal conversion process is always based on the true time series, improving the temporal consistency and logical stability of the trend extrapolation process.
[0040] This invention establishes a clear starting boundary and control range for the repair process of abnormal segments by setting an entry point for sequential adjustment and rearranging the time sequence data records one by one within the interlaced sections. This allows for the restoration of the time progression direction without altering the normal segment arrangement. By releasing the correspondence between the time increment markers and the sequence numbers, the restored time series maintains consistency with the actual generation order, thereby preventing the dynamic model from making reverse path judgments during the extrapolation process and improving the reliability of trend prediction results and the accuracy of risk assessment decisions.
[0041] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A method for predicting the conversion process and trend of heavy metals based on a reaction kinetic model, characterized in that, Includes the following steps: To collect continuous monitoring data required for the prediction of heavy metal conversion processes and trends, time-series data records are generated. When each time-series data record is generated, a time increment marker is extracted, and a sequence number is written at the end of each time-series data record to indicate the actual order of generation. Extract the sequence number from the compressed time-series data records and compare it with the sequence number in the uncompressed time-series data records line by line to form a sequence offset trajectory in the time-series data record sequence; Based on the sequential offset trajectory, the change direction of the time increment mark is analyzed segment by segment to identify abnormal segments where the sequential number continues to increase while the time increment mark regresses. Reverse change segment markers are formed at the corresponding positions of the abnormal segments to limit the range of sequence disorder. Based on the reverse change segment identifier, trace back the corresponding sequence number record, sort out the intersecting segments between the actual generation order and the current storage order, extract the time range corresponding to the intersecting segment, and set the order adjustment entry at the corresponding position of the time range. Around the entry point for sequence adjustment, a progressive sequence restoration process is performed on the intersecting sections. Within the intersecting sections, the time sequence data records are rearranged one by one according to the sequence number, and the time increment markers are released according to the actual order of generation, so that the direction of time progression is consistent with the actual order of generation.
2. The method for predicting the heavy metal conversion process and trend based on a reaction kinetic model according to claim 1, characterized in that, The steps for extracting time-incrementing markers are as follows: Collect continuous monitoring data to form time-series data records. When each time-series data record is generated, extract the time increment marker and write the time increment marker into a fixed field position. Generate a sequence number corresponding to the time-series data record. The sequence number is arranged in ascending order according to the actual order of generation and written to the end field position of the time-series data record, so that the time increment mark and the sequence number form a one-to-one correspondence. During continuous monitoring, the extraction of time increment markers and the writing of sequence numbers are continuously performed, so that the time sequence data records simultaneously present the time increment marker progression path and the sequence number progression path. Time-sequential data records containing time increment markers and sequence numbers are submitted to the storage and compression process to maintain the correspondence between time increment markers and sequence numbers.
3. The method for predicting the heavy metal conversion process and trend based on a reaction kinetic model according to claim 2, characterized in that, The steps for forming a sequential offset trajectory are as follows: Read the compressed, time-series data records, extract the sequence number from the end of each time-series data record, and register them according to the current storage order to form the first sequence number sequence; Retrieve the time-ordered data records arranged according to their actual generation sequence before compression, extract the corresponding sequence numbers to form a second sequence number sequence, and arrange the first and second sequence number sequences side by side with the current storage order as the index reference. Record the numerical differences between the first and second sequential numbering sequences at the same index position to form an offset numerical sequence, and arrange them continuously according to the index order; Based on the offset value sequence, the corresponding offset values are connected in the time sequence data record to form a sequential offset trajectory, and the sequential offset trajectory is saved in correspondence with the time sequence data record.
4. The method for predicting the heavy metal conversion process and trend based on a reaction kinetic model according to claim 3, characterized in that, The offset value sequence is arranged continuously according to the index position in the current storage order. The sequential offset trajectory is connected by the correspondence of the offset value sequence to form a continuous changing path. The sequential offset trajectory maintains a one-to-one correspondence with the time-ordered data records.
5. The method for predicting the heavy metal conversion process and trend based on a reaction kinetic model according to claim 3, characterized in that, The steps for forming the reverse change section identifier are as follows: Read the time-series data records bound to the sequential offset trajectory, extract the sequence number and time increment marker one by one according to the current storage order, and construct a continuous control sequence; By comparing the changes in the sequential numbering and the changes in the time increment markers of adjacent time-series data records in a continuous control sequence, the index position where the sequential numbering remains incremented and the time increment markers regress is determined. Continue to perform the judgment of changes in sequence number and time increment mark along the current storage order, and define the range of abnormal segments where the sequence number remains incremented and the time increment mark has rolled back; Write reverse change segment identifiers at the start and end index positions of the abnormal segment, and associate the reverse change segment identifiers with the sequential offset trajectory.
6. The method for predicting the heavy metal conversion process and trend based on a reaction kinetic model according to claim 5, characterized in that, The range of abnormal segments is recorded synchronously based on the sequential numbering interval and the time-incrementing marker interval, and the index correspondence is maintained in the current storage order. The reverse change segment identifier includes the sequential numbering interval information and the time-incrementing marker interval information.
7. The method for predicting the heavy metal conversion process and trend based on a reaction kinetic model according to claim 5, characterized in that, The steps for setting the order of entry points are as follows: Based on the reverse change segment identifier, determine the start and end index positions of the abnormal segment, read the corresponding time sequence data records and extract the sequence number and time increment marker to form the current storage order list; Retrieve the chronological data records of the actual occurrence order, locate the position of the sequence number within the abnormal segment in the actual occurrence order, and construct a dual position mapping relationship; Reorder the time-sequence data records within the abnormal segment according to their actual order of generation, and identify the overlapping sections between the current storage order and the actual order of generation. Extract the time increment markers corresponding to the interlaced segments to form a time range, and set the order adjustment entry at the starting index position of the interlaced segment corresponding to the time range.
8. The method for predicting the heavy metal conversion process and trend based on a reaction kinetic model according to claim 7, characterized in that, The process involves progressively restoring the order of data in the interleaved sections by adjusting the order entry point. Within each interleaved section, the time sequence data records are rearranged sequentially according to the ascending order of their sequence numbers. The time increment markers are then released in the actual order of their creation, as follows: The starting and ending index positions of the interlaced segment corresponding to the positioning sequence are adjusted. The time sequence data records inside the interlaced segment are read and the sequence number and time increment mark are extracted to form an interlaced segment record list. Arrange the list of records in the intersecting sections according to the ascending sequential numbering, and then locate the time-sequential data records in the actual order of generation in the list to the corresponding index position of the order adjustment entry for rearrangement. Insert chronologically ordered data records one by one into the list arranged in the actual order of their generation, adjust the arrangement position within the interleaved section, and keep the external index position of the interleaved section unchanged; Based on the actual order of their generation, the time increment markers within the interleaved section are continuously released and connected with the time sequence data records outside the interleaved section to restore the consistent direction of time progression.