Method for realizing reversible conversion between bounded variables and unbounded variables on two sides and related product
By converting the bounded variable on both sides of water transport into unbounded variables and proving that the transformation is reversible, the problem of difficult processing of two-sided bounded variables in the prior art is solved, and efficient data assimilation and model deviation correction effects are achieved.
Patent Information
- Application Number
- CN202510380099.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-06-27
AI Technical Summary
In the construction of intelligent water transportation, it is difficult for the existing technology to effectively deal with two-sided bounded variables, resulting in data assimilation and model correction, the correction results are likely to exceed the boundaries, introduce new errors, and affect the data assimilation effect.
By converting the two-sided bounded variable into unbounded variables and proving that the transformation is reversible, the variable is divided into 3 intervals using the two parameters LX and UX, and the logarithmic function, linear function and logarithmic function are used to convert it, ensuring that the function is continuous and the first-order derivative is continuous at the segmentation point.
The reversible transformation of bounded variables and unbounded variables on both sides of water transport is achieved, and the errors introduced due to boundary exceedance during data assimilation and model correction are avoided, the continuity and integrity of the algorithm are ensured, and the data assimilation and correction effect is improved.
Smart Images

Figure CN120216820A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of water transportation intelligent construction, and particularly relates to a method and related products for realizing reversible conversion between bilateral bounded variables and unbounded variables. Background Technique
[0002] In the construction of water transportation intelligence, a series of observable water transportation elements and computable and predictable water transportation variables need to be processed, and data fusion is carried out by using technologies such as big data and large models. Among the commonly used technical means is data assimilation, that is, combining observation data with model predictions, using the observation results to correct (or rectify) the prediction results, and obtaining a better result through assimilation on the basis of comprehensively considering observation errors and prediction errors, and continuously updating the model calculation. The water transportation elements (or water transportation variables) involved include unbounded variables, bilateral bounded variables, lower-bound bounded variables, and upper-bound bounded variables. Unbounded variables include: flow velocity (a positive value indicates the same direction as the specified direction, and a negative value indicates the opposite direction to the specified direction), wind speed, etc.; bilateral bounded variables include: water temperature (0-100 degrees Celsius), humidity (0-saturation humidity), lock operation water level (design lowest-design highest), upstream dam water level of the hub (dead water level-design highest), etc.; lower-bound bounded variables include: rainfall (greater than or equal to 0), snowfall, water depth, etc.; upper-bound bounded variables include: potential energy difference of the water flow relative to the source (less than or equal to 0), soil water suction (when the soil reaches the saturated state, the soil water suction is 0, and the soil water suction is often represented by a negative number), etc.
[0003] When carrying out data assimilation or robust correction on the observed values of the above water transportation elements or the calculated values of water transportation variables, mathematical models or signal control algorithms such as Kalman filtering and gradient descent method are often introduced. Many of these models (or algorithms) have good natural applicability to unbounded variables, but poor applicability to bounded variables, and the effect is poor when directly applied to the observation of water transportation bounded elements or the correction of calculated variables. The situation where the calculated result after correction exceeds the limited boundary will be encountered. The conventional method is to insert intermediate steps in the algorithm to force the corrected result back within the boundary conditions. This will cause the original basic assumptions of the algorithm to be violated and break the continuity of the algorithm, thereby introducing unestimable new errors in the process, resulting in the failure of model correction or the collapse of the algorithm, and ultimately affecting the effect of data assimilation.
[0004] The above problems are most prominent in the case of two-sided bounded variables because two-sided bounded variables have both upper and lower boundaries. Correspondingly, in the process of data assimilation (or error correction), there is a risk that the two sets of correction results exceed the boundaries and are forcibly truncated, and the truncation errors introduced by such operations are unpredictable. Therefore, the outer nested data assimilation algorithms for (or including) two-sided bounded variables are more likely to crash. In view of the above situation, developing a method that can map two-sided bounded variables in water transportation into unbounded variables is an effective idea to solve this problem. However, a scheme for inversely transforming the mapped unbounded variables back to the original variables must be provided. Thus, a reversible transformation between two-sided bounded variables and unbounded variables in water transportation is achieved. Summary of the Invention
[0005] In view of this, the present invention aims to propose a method and related products for realizing the reversible transformation between two-sided bounded variables and unbounded variables to solve at least one of the problems existing in the above-mentioned prior art.
[0006] To achieve the above object, the technical solution of the present invention is realized as follows:
[0007] A method for realizing the reversible transformation between two-sided bounded variables and unbounded variables includes the following steps:
[0008] S1. Select the two-sided bounded variables among the water transportation variable parameters and obtain the values of the two-sided bounded variables;
[0009] S2. Transform the two-sided bounded variables into unbounded variables;
[0010] S3. Prove that the mathematical transformation between the two-sided bounded variables and the unbounded variables is reversible;
[0011] S4. Prove that the function is continuous at the splitting points of the forward and reverse transformations;
[0012] S5. Prove that the first-order derivative is continuous at the splitting points of the forward and reverse transformations.
[0013] Further, in step S1, selecting the two-sided bounded variables among the water transportation variable parameters and obtaining the values of the two-sided bounded variables includes:
[0014] Let x be the two-sided bounded variable, the upper boundary of its value range be UB, and the lower boundary be LB. The value range of the two-sided bounded variable is expressed as:
[0015]
[0016] Further, in step S2, transforming the two-sided bounded variables into unbounded variables includes:
[0017] The x variable is divided into three intervals by two parameters LX and UX, namely (LB, LX), [LX, UX] and (UX, UB); in these three intervals, the x is transformed into an unbounded variable y using a conversion function based on the logarithmic function, a linear conversion function, and a conversion function based on the logarithmic function respectively. The formula is:
[0018]
[0019] The value range of the transformed variable y is:
[0020]
[0021] Correspondingly, to inversely transform y back to x, the required inverse transformation formula is the inverse function of f(x), that is:
[0022]
[0023] The functions f(x) and its inverse f -1 (y) are used to achieve the reversible transformation between the two-sided bounded variable x and the unbounded variable y.
[0024] Furthermore, in step S3, it is proved that the mathematical transformation between the two-sided bounded variable and the unbounded variable is reversible, including:
[0025] Let x be a two-sided bounded variable, the upper boundary of its value range is UB, and the lower boundary is LB. The value range of the two-sided bounded variable is expressed as:
[0026]
[0027] The x variable is divided into three intervals by two parameters LX and UX, namely (LB, LX), [LX, UX] and (UX, UB);
[0028] For x in the interval (LB, LX), that is, LB < x < LX; it is transformed into an unbounded variable:
[0029]
[0030] Obviously, when LB < x < LX, the transformed y < LX;
[0031] To prove that the reversible transformation between the two-sided bounded variable and the unbounded variable can be achieved; then apply the formula to inversely transform y to obtain x_new:
[0032]
[0033] That is, x_new = x;
[0034] Similarly, for x in the interval [LX, UX], that is, LX ≤ x ≤ UX; it is transformed into an unbounded variable:
[0035] y = f(f) = x;
[0036] Obviously, when LX ≤ x ≤ UX, the transformed LX ≤ y ≤ UX;
[0037] To prove that the reversible transformation between the two-sided bounded variable and the unbounded variable can be achieved; apply the formula to y for inverse transformation to obtain x_new:
[0038] x_new = f -1 (y) = y = x;
[0039] That is, x_new = x;
[0040] Similarly, for x in the interval (UX, UB), that is, UX < x < UB; it is transformed into an unbounded variable:
[0041]
[0042] When UX < x < UB, the transformed y > UX;
[0043] To prove that the reversible transformation between the two-sided bounded variable and the unbounded variable can be achieved; apply the formula to y for inverse transformation to obtain x_new:
[0044]
[0046] That is, x_new = x;
[0047] Therefore, the conclusions obtained by the inverse transformation after the transformation of x in the three intervals (LB, LX), [LX, UX], and (UX, UB) are the same, that is, for any x, the x_new obtained by its inverse transformation after transformation is x_new = x. Therefore, the reversible transformation between the two-sided bounded variable and the unbounded variable can be achieved.
[0048] Furthermore, in step S4, to prove the continuity of the function at the forward and reverse transformation breakpoints, it includes proving the continuity of the function at the forward transformation breakpoint and proving the continuity of the function at the reverse transformation breakpoint; among them, proving the continuity of the function at the forward transformation breakpoint includes:
[0049] Divide the value range (LB, UB) of the two-sided bounded variable into three parts, namely: (LB, LX), (LX, UX) and (UX, UB);
[0050] In the first interval, that is, when LB < x < LX:
[0051]
[0052] In the second interval, i.e., when LX ≤ x ≤ UX:
[0053]
[0054] f(LX) = LX;
[0055] f(UX) = UX;
[0056] In the third interval, i.e., when UX < x < U:
[0057]
[0058] In summary,
[0059]
[0060] Therefore, the function is continuous at the segmentation points x = LX and x = UX;
[0061] Proving the continuity of the function at the inverse transformation segmentation points includes:
[0062] Similarly, the inverse transformation also has three intervals, y > UX, LX ≤ y ≤ UX, and y < LX;
[0063] When y > UX:
[0064]
[0065] When LX ≤ y ≤ UX:
[0066]
[0067] f -1 (LX) = LX;
[0068] f -1 (UX) = UX;
[0069] When y < LX:
[0070]
[0071] Therefore, the function is continuous at the segmentation points y = LX and y = UX during the inverse transformation process.
[0072] Furthermore, in step S5, proving the continuity of the first-order derivative at the forward and inverse transformation segmentation points includes proving the continuity of the first-order derivative at the forward transformation segmentation points and proving the continuity of the first-order derivative at the inverse transformation segmentation points; among them, proving the continuity of the first-order derivative at the forward transformation segmentation points includes:
[0073] Divide the value range (LB, UB) of the bilateral bounded variable into three parts, namely: (LB, LX), (LX, UX), and (UX, UB); thus, there are two splitting points LX and UX.
[0074] For the case of the splitting point x = LX:
[0075] When LB < x < LX:
[0076]
[0077] When x → LX, the first derivative of the conversion function is:
[0078]
[0079] When LX ≤ x ≤ UX:
[0080] y′ = f′(x) = 1;
[0081] Therefore, the first derivative is continuous at the splitting point x = LX;
[0082] For the case of the splitting point x = UX:
[0083] When UX < x < UB:
[0084]
[0085] When x → UX, the first derivative of the conversion function is:
[0086]
[0087] Therefore, the first derivative is continuous at the splitting point x = UX;
[0088] Prove that the first derivative is continuous at the splitting points of the inverse transformation, including:
[0089] Similarly, there are also three intervals for the inverse transformation, namely y > UX, LX ≤ y ≤ UX, and y < LX; thus, there are two splitting points UX and LX;
[0090] For the case of the splitting point y = UX:
[0091] When y > UX, the derivative of the inverse transformation function is:
[0092]
[0093] When y → UX, the first derivative of the inverse transformation function is:
[0094]
[0095] When LX ≤ y ≤ UX:
[0096] x′ = [f -1 (y)]′ = 1;
[0097] Therefore, the first derivative of the inverse transformation process is continuous at the segmentation point y = UX;
[0098] For the case of the segmentation point y = LX:
[0099] When y < LX:
[0100]
[0101] When y → LX, the first derivative of the inverse transformation function is:
[0102]
[0103] Therefore, the first derivative of the inverse transformation process is continuous at the segmentation point y = LX.
[0104] An electronic device includes a processor and a memory communicatively connected to the processor and used for storing instructions executable by the processor, and the processor is used for executing the method for realizing the reversible conversion between two-sided bounded variables and unbounded variables.
[0105] A server includes at least one processor and a memory communicatively connected to the processor, and the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor to enable the at least one processor to execute the method for realizing the reversible conversion between two-sided bounded variables and unbounded variables.
[0106] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it realizes the method for realizing the reversible conversion between two-sided bounded variables and unbounded variables.
[0107] Compared with the prior art, a method for realizing the reversible conversion between two-sided bounded variables and unbounded variables and related products according to the present invention have the following advantages:
[0108] (1) A method and related products for realizing reversible conversion between bilateral bounded variables and unbounded variables. The method and device proposed in the present invention achieve the conversion of bilateral bounded variables in water transportation to unbounded variables, overcoming the inapplicability of the Kalman filter, steepest descent method, DSRC method, etc. (or externally nested) to bilateral bounded variables when performing data assimilation or mathematical model robust rectification. Compared with the traditional method of "inserting intermediate steps in the algorithm and forcibly adjusting the corrected result back within the boundary conditions", it can ensure that the basic assumptions of these externally nested algorithms are not violated, guarantee the continuity and integrity of the algorithm, avoid the introduction of new, unestimable and uncontrollable errors, and theoretically enable the externally nested data assimilation and model rectification models to be more stable with better assimilation and rectification effects.
[0109] (2) A method and related products for realizing reversible conversion between bilateral bounded variables and unbounded variables. The present invention divides the x variable into three intervals using two parameters LX and UX, namely (LB, LX), [LX, UX], and (UX, UB). Mathematically, it is proved that the forward and reverse transformations are continuous at the segmentation points, and it is also proved that the first-order derivatives of the forward and reverse transformations are continuous at the segmentation points. In the first interval, a conversion relationship is constructed based on the conversion function of the logarithmic function, and after conversion, the lower boundary extends infinitely to -∞; in the second interval, the linear function conversion relationship of y = x is directly adopted to ensure that the nature of the variables before and after conversion remains unchanged in most cases, which is beneficial to reducing the complexity of possible scientific problem analysis; in the third interval, a conversion relationship is constructed based on the conversion function of the logarithmic function, and after conversion, the upper boundary extends infinitely to +∞. This shows that the method proposed in the present invention can arbitrarily set intervals in bilateral bounded variables to achieve a 1:1 transformation within this interval segment. This provides a solution to the problem of needing to keep the variables before and after conversion unchanged within a certain range. It enables the conversion relationship to be simply and clearly realized within any required interval, and the nature of the variables before and after conversion remains consistent within this interval.
[0110] (3) A method and related products for realizing reversible conversion between bilateral bounded variables and unbounded variables. The method proposed in the present invention has reversibility and realizes the reverse transformation of unbounded variables to bilateral bounded variables in water transportation. This enables the method proposed in the present invention to be used as a pre - or post - converter for any mathematical method. It reversibly converts the common bilateral bounded variables in water transportation problems into unbounded variables to meet the requirements of mathematical methods for variable boundaryless conditions. The reversible conversion of the present invention is based on pure mathematical formulas rather than establishing a mapping table for one - to - one correspondence and intermediate interpolation, and the proposed method is universal. It avoids the complex operations of establishing and querying the mapping table, and the absence of intermediate interpolation also avoids the introduction of interpolation errors. It reduces the memory occupation of the calculation module, speeds up the calculation speed, and reduces errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0111] The accompanying drawings, which form a part of this invention, are used to provide a further understanding of the invention. The schematic embodiments and descriptions thereof of the invention are used to explain the invention and shall not unduly limit the invention. In the drawings:
[0112] Figure 1 It is a schematic diagram of the reversible transformation process between the bilateral bounded variable x and the unbounded variable y according to an embodiment of the invention;
[0113] Figure 2 It is a schematic diagram of the method flow according to an embodiment of the invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0114] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments may be combined with each other.
[0115] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "center", "longitudinal", "transverse", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined with "first", "second", etc. may explicitly or implicitly include one or more of such features. In the description of the present invention, unless otherwise specified, the meaning of "a plurality" is two or more.
[0116] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0117] The present invention will be described in detail below with reference to the drawings and in combination with the embodiments.
[0118] As Figures 1 to 2 shown, a method for realizing the reversible conversion between a bilateral bounded variable and an unbounded variable includes the following steps:
[0119] S1. Select the bounded variables on both sides among the water transportation variable parameters and assign values to the bounded variables on both sides;
[0120] S2. Convert the bounded variables on both sides into unbounded variables;
[0121] S3. Prove that the mathematical transformation between the bounded variables on both sides and the unbounded variables is reversible;
[0122] S4. Prove that the function is continuous at the splitting points of the forward and reverse transformations;
[0123] S5. Prove that the first derivative is continuous at the splitting points of the forward and reverse transformations.
[0124] In a preferred embodiment of the present invention, the method includes:
[0125] Let x be the bounded variable on both sides, the upper boundary of its value range be UB, and the lower boundary be LB. The value range of this bounded variable on both sides can be expressed as:
[0126]
[0127] Now it is necessary to convert this bounded variable on both sides into an unbounded variable. The present invention uses two parameters LX and UX to divide the x variable into three intervals, namely (LB, LX), [LX, UX] and (UX, UB). In these three intervals, the x is converted into an unbounded variable y by using a conversion function based on the logarithmic function, a linear conversion function and a conversion function based on the logarithmic function respectively. The specific formula is:
[0128]
[0129] The value range of the converted variable y is:
[0130]
[0131] Correspondingly, to inversely transform y back to x, the required inverse transformation formula is the inverse function of f(x), that is:
[0132]
[0133] By applying the function f(x) and its inverse function f -1 (y), the reversible transformation between the bounded variable x on both sides and the unbounded variable y can be realized.
[0134] Prove that this mathematical transformation is reversible:
[0135] Let x be the bounded variable on both sides, the upper boundary of its value range be UB, and the lower boundary be LB. The value range of this bounded variable on both sides can be expressed as:
[0136]
[0137] The present invention divides the x variable into three intervals using two parameters, LX and UX, namely (LB, LX), [LX, UX], and (UX, UB).
[0138] (1) For x in the interval (LB, LX), that is, LB < x < LX. It is transformed into an unbounded variable using the method proposed by the present invention:
[0139]
[0140] Obviously, when LB < x < LX, the transformed y < LX.
[0141] To prove that the method proposed by the present invention can achieve a reversible transformation between two-sided bounded variables and unbounded variables. Then apply the inverse transformation to y using the formula proposed by the present invention to obtain x_new:
[0142]
[0144] That is, x_new = x.
[0145] (2) Similarly, for x in the interval [LX, UX], that is, LX ≤ x ≤ UX. It is transformed into an unbounded variable using the method proposed by the present invention:
[0146] y = f(x) = x;
[0147] Obviously, when LX ≤ x ≤ UX, the transformed LX ≤ y ≤ UX.
[0148] To prove that the method proposed by the present invention can achieve a reversible transformation between two-sided bounded variables and unbounded variables. Then apply the inverse transformation to y using the formula proposed by the present invention to obtain x_new:
[0149] x_new = f -1 (y) = y = x;
[0150] That is, x_new = x.
[0151] (3) Similarly, for x in the interval (UX, UB), that is, UX < x < UB. It is transformed into an unbounded variable using the method proposed by the present invention:
[0152]
[0153] When UX < x < UB, the transformed y > UX.
[0154] To prove that the method proposed by the present invention can achieve a reversible transformation between two-sided bounded variables and unbounded variables. Then apply the inverse transformation to y using the formula proposed by the present invention to obtain x_new:
[0155]
[0156] That is, x_new = x.
[0157] In summary, the conclusions obtained from the inverse transformation after the transformation of x in the three intervals (LB, LX), [LX, UX], and (UX, UB) are the same. That is, for any x, the x_new obtained from the inverse transformation after the transformation is x_new = x. Therefore, the method proposed in the present invention can achieve the reversible conversion between a bilateral bounded variable and an unbounded variable.
[0158] Prove that the function is continuous at the segmentation points of the forward and reverse transformations:
[0159] Prove that the function is continuous at the segmentation point of the forward transformation:
[0160] The method proposed in the present invention divides the value range (LB, UB) of the bilateral bounded variable into three parts, namely: (LB, LX), (LX, UX), and (UX, UB).
[0161] In the first interval, that is, when LB < x < LX:
[0162]
[0163] In the second interval, that is, when LX ≤ x ≤ UX:
[0164]
[0165] f(LX) = LX;
[0166] f(UX) = UX;
[0167] In the third interval, that is, when UX < x < UB:
[0168]
[0169] In summary,
[0170]
[0171] Therefore, the function of the proposed transformation method is continuous at the segmentation points x = LX and x = UX.
[0172] Prove that the function is continuous at the segmentation point of the reverse transformation:
[0173] Similarly, there are also three intervals for the inverse transformation, y > UX, LX ≤ y ≤ UX, and y < LX.
[0174] When y > UX:
[0175]
[0176] When LX ≤ y ≤ UX:
[0177]
[0178] f -1 (LX) = LX;
[0179] f -1 (UX) = UX;
[0180] When y < LX:
[0181]
[0182] Therefore, the inverse transformation process is continuous at the splitting points y = LX and y = UX.
[0183] Prove that the first-order derivative is continuous at the splitting points of the forward and reverse transformations:
[0184] Prove that the first-order derivative is continuous at the splitting point of the forward transformation:
[0185] The method proposed in the present invention divides the value range (LB, UB) of the two-sided bounded variable into three parts, namely: (LB, LX), (LX, UX) and (UX, UB). Therefore, there are two splitting points LX and UX.
[0186] (1) For the case of the splitting point x = LX:
[0187] When LB < x < LX:
[0188]
[0189] When x → LX, the first-order derivative of the conversion function is:
[0190]
[0191] When LX ≤ x ≤ UX:
[0192] y' = f'(x) = 1;
[0193] Therefore, the proposed transformation method is continuous at the splitting point x = LX.
[0194] (2) For the case of the splitting point x = UX:
[0195] When UX < x < UB:
[0196]
[0197] When x → UX, the first-order derivative of the conversion function is:
[0198]
[0199] Therefore, the first derivative of the proposed transformation method is continuous at the segmentation point x = UX.
[0200] Prove that the first derivative of the inverse transformation is continuous at the segmentation point:
[0201] Similarly, the inverse transformation also has three intervals, namely y > UX, LX ≤ y ≤ UX, and y < LX. Therefore, there are two segmentation points UX and LX.
[0202] (1) For the case of the segmentation point y = UX:
[0203] When y > UX, the derivative function of the inverse transformation function is:
[0204]
[0205] When y → UX, the first derivative of the inverse transformation function is:
[0206]
[0207] When LX ≤ y ≤ UX:
[0208] x′ = [f -1 (y)]′ = 1;
[0209] Therefore, the first derivative of the inverse transformation process is continuous at the segmentation point y = UX.
[0210] (2) For the case of the segmentation point y = LX:
[0211] When y < LX:
[0212]
[0214] When y → LX, the first derivative of the inverse transformation function is:
[0215]
[0216] Therefore, the first derivative of the inverse transformation process is continuous at the segmentation point y = LX.
[0217] The present invention also provides an electronic device, including a processor and a memory communicatively connected to the processor and used for storing executable instructions of the processor, and the processor is used for executing the method for realizing the reversible conversion between the bilateral bounded variable and the unbounded variable.
[0218] The present invention also provides a server, including at least one processor, and a memory communicatively connected to the processor. The memory stores instructions executable by the at least one processor. When the instructions are executed by the processor, the at least one processor is enabled to execute the method for realizing the reversible conversion between bilateral bounded variables and unbounded variables.
[0219] The present invention also provides a computer-readable storage medium storing a computer program, which realizes the method for realizing the reversible conversion between bilateral bounded variables and unbounded variables when being executed by a processor.
[0220] Advantages of the present invention:
[0221] (1) The method and device provided by the present invention realize the conversion of bilateral bounded variables in water transportation into unbounded variables, overcoming the inapplicability of bilateral bounded variables of the Kalman filter, the steepest descent method, the DSRC method, etc. (or externally nested) used in data assimilation or anti-robust rectification of mathematical models. Compared with the traditional method of "inserting intermediate steps in the algorithm and forcibly adjusting the corrected result back within the boundary conditions", it can ensure that the basic assumptions of these externally nested algorithms are not damaged, guarantee the continuity and integrity of the algorithm, avoid the introduction of new, uncontrollable errors, and theoretically make the externally nested data assimilation and model rectification models more stable and the assimilation and rectification effects better.
[0222] (2) The present invention divides the x variable into three intervals with two parameters LX and UX, namely (LB, LX), [LX, UX], and (UX, UB). Mathematically, it is proved that the forward and reverse transformations are continuous at the segmentation points in terms of the function, and it is also proved that the first-order derivatives of the forward and reverse transformations are continuous at the segmentation points. In the first interval, a conversion relationship is constructed based on the conversion function of the logarithmic function, and after conversion, the lower boundary extends infinitely to -∞; in the second interval, the linear function conversion relationship of y = x is directly adopted to ensure that the nature of the variables before and after conversion remains unchanged in most cases, which is conducive to reducing the complexity of possible scientific problem analysis; in the third interval, a conversion relationship is constructed based on the conversion function of the logarithmic function, and after conversion, the upper boundary extends infinitely to +∞. It shows that the method provided by the present invention can arbitrarily set intervals in bilateral bounded variables and realize a 1:1 transformation within this interval segment. This provides a solution to the problem that the variables before and after conversion need to remain unchanged within a certain range. It makes the conversion relationship simple and clear within any required interval, and the nature of the variables before and after conversion remains consistent within this interval.
[0223] (3) The method proposed by the present invention is reversible, realizing the reverse transformation of an unbounded variable into a water-transport bilateral bounded variable. This enables the method proposed by the present invention to be used as a pre- and post-converter for any mathematical method. It reversibly converts the common bilateral bounded variables in water-transport problems into unbounded variables, meeting the requirements of mathematical methods for variable boundaryless conditions. The reversible transformation of the present invention is based on pure mathematical formulas, rather than establishing a mapping table for one-to-one correspondence and intermediate interpolation, and the proposed method is universal. It avoids the complex operations of establishing and querying the mapping table, and the absence of intermediate interpolation also avoids introducing interpolation errors. It reduces the memory occupation of the calculation module, speeds up the calculation speed, and reduces errors.
[0224] Embodiment 1
[0225] Suppose a water-transport variable x represents the operating water level of a ship lock (expressed by its elevation relative to a certain fixed reference plane), with its designed minimum elevation being -2 m and the designed maximum elevation being 8 m. Then, this water-transport variable x is a typical bilateral bounded variable. To better adapt to data assimilation algorithms such as Kalman filtering, it needs to be converted into an unbounded variable y, and it is required that... And such a conversion is required to be reversible mathematically.
[0226] Applying the method of the present invention, the steps are as follows:
[0227] ① Identify the upper boundary UB = 8 and the lower boundary LB = -2 of x. And set the transformation parameters UX and LX as needed, requiring UB > UX > LX > LB. In this embodiment, UX = 7 and LX = 0 are stored in the parameter storage module as follows:
[0228] UB = 8;
[0229] UX = 7;
[0230] LX = 0;
[0231] LB = -2;
[0232] ② Use the calculation module to apply the formula proposed by the present invention to construct the corresponding conversion function, convert the bilateral bounded variable x into the unbounded variable y, and output and store the result in the result storage module as follows:
[0233]
[0234] ③ If it is necessary to inversely transform the unbounded variable y back into the bilateral bounded variable x, then use the calculation module to apply the formula proposed by the present invention to construct the corresponding conversion function, output the result and store the result in the result storage module as follows:
[0235]
[0236] In this embodiment, the schematic diagram of the reversible transformation process between the two-sided bounded variable x and the misinterpreted variable y is as follows Figure 1 as shown. Figure 1 In (a) of Figure 1 , it represents the process of converting the two-sided bounded variable x into the unbounded variable y. Figure 1 In (b) of Figure 1 , it represents the relationship between the original two-sided bounded variable x and x_new obtained after two conversions. Figure 1 In (c) of Figure 1 , it represents the process of inversely converting the unbounded variable y back to the two-sided bounded variable (using x_new to represent the inverse conversion result, distinguished from the initial variable x).
[0237] From Figure 1 In (a) of Figure 1 , it can be seen that the method proposed in the present invention successfully converts the two-sided bounded variable x with a value range of (-2, 8) into an unbounded variable with a value range of (-∞, ∞). The conversion is carried out in 3 intervals, namely (-2, 0), [0, 7], and (7, 8). For example, when x = 1, the converted y = -1.3863; when x = 4, the converted y = 4; when x = 7.5, the converted y = -7.6931.
[0238] From Figure 1 In (c) of Figure 1 , it can be seen that the inverse transformation function in the method proposed in the present invention successfully inversely converts the unbounded variable y with a value range of (-∞, ∞) back to the two-sided bounded variable with a value range of (-2, 8). Figure 1 In (c) of Figure 1 , the notation x_new is used to represent the inverse conversion result for distinction. For example, when y = -1.3863, the inverse conversion result x_new = 1.
[0239] From Figure 1 In (b) of Figure 1 , it can be seen that the conversion method proposed in the present invention is reversible. For example, for the two-sided bounded variable x with a value range of (-2, 8), at a certain point x = 1, after being converted by the conversion function, a certain point y = -1.3863 in the corresponding unbounded variable y is obtained. After this point is converted by the inverse transformation function, the obtained two-sided bounded variable x_new, and its corresponding x_new = 1. That is, x_new = x.
[0240] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for realizing reversible transformation of bilaterally bounded variables to unbounded variables, characterized in that: Including the following steps: S1. Select the two-sided bounded variable among the water transportation variable parameters and assign values to the two-sided bounded variable; S2. Convert the two-sided bounded variable into an unbounded variable; S3. Prove that the mathematical transformation between the two-sided bounded variable and the unbounded variable is reversible; S4. Prove that the function is continuous at the splitting points of the forward and reverse transformations; S5. Prove that the first derivative is continuous at the splitting points of the forward and reverse transformations.
2. A method for realizing reversible transformation of bilaterally bounded variables to unbounded variables according to claim 1, characterized in that: In step S1, selecting the two-sided bounded variable among the water transportation variable parameters and assigning values to the two-sided bounded variable includes: Let x be the two-sided bounded variable, the upper boundary of its value range be UB, and the lower boundary be LB. The value range of the two-sided bounded variable is expressed as:
3. A method for realizing reversible transformation of bilaterally bounded variables to unbounded variables according to claim 1, characterized in that: In step S2, converting the two-sided bounded variable into an unbounded variable includes: Use two parameters LX and UX to divide the x variable into three intervals, namely (LB, LX), [LX, UX], and (UX, UB); in these three intervals, use the conversion function based on the logarithmic function, the linear conversion function, and the conversion function based on the logarithmic function to convert x into the unbounded variable y. The formula is: The value range of the converted variable y is: Correspondingly, to inversely transform y back to x, the required inverse transformation formula is the inverse function of f(x), that is: Use the function f(x) and its inverse function f -1 (y) Realizes the reversible transformation of a bilaterally bounded variable x and an unbounded variable y.
4. A method for realizing reversible transformation of bilaterally bounded variables to unbounded variables according to claim 1, characterized in that: In step S3, proving that the mathematical transformation between the two-sided bounded variable and the unbounded variable is reversible includes: Let x be the two-sided bounded variable, the upper boundary of its value range be UB, and the lower boundary be LB. The value range of the two-sided bounded variable is expressed as: Use two parameters LX and UX to divide the x variable into three intervals, namely (LB, LX), [LX, UX], and (UX, UB); For x in the interval (LB, LX), that is, LB < x < LX; convert it into an unbounded variable: Obviously, when LB < x < LX, the converted y < LX; To prove that the reversible transformation between the two-sided bounded variable and the unbounded variable can be achieved; then apply the formula to inversely transform y to obtain x_new: That is, x_new = x; Similarly, for x in the interval [LX, UX], that is, LX ≤ x ≤ UX; convert it into an unbounded variable: y = f(x) = x; Obviously, when LX ≤ x ≤ UX, the converted LX ≤ y ≤ UX; To prove that the reversible transformation between the two-sided bounded variable and the unbounded variable can be achieved; then apply the formula to inversely transform y to obtain x_new: x_new=f -1 (y)=y=x; That is, x_new = x; Similarly, for x in the interval (UX, UB), that is, UX < x < UB; convert it into an unbounded variable: When UX < x < UB, the converted y > UX; To prove that the reversible transformation between the two-sided bounded variable and the unbounded variable can be achieved; then apply the formula to inversely transform y to obtain x_new: That is, x_new = x; Therefore, the conclusions obtained by the transformation and then inverse transformation of x in the three intervals (LB, LX), [LX, UX], and (UX, UB) are the same, that is, for any x, the x_new obtained by its transformation and then inverse transformation is x_new = x. Therefore, the reversible transformation between the two-sided bounded variable and the unbounded variable can be achieved.
5. A method for realizing reversible transformation of bilaterally bounded variables to unbounded variables according to claim 1, characterized in that: In step S4, it is proved that the function is continuous at the forward and reverse transformation segmentation points, including proving the continuity of the function at the forward transformation segmentation point and proving the continuity of the function at the reverse transformation segmentation point; among them, proving the continuity of the function at the forward transformation segmentation point includes: The value range interval (LB, UB) of the two-sided bounded variable is divided into three parts, namely: (LB, LX), (LX, UX), and (UX, UB); In the first interval, that is, when LB < x < LX: In the second interval, that is, when LX ≤ x ≤ UX: f(LX) = LX; f(UX) = UX; In the third interval, that is, when UX < x < UB: In summary, Therefore, the function is continuous at the segmentation points x = LX and x = UX; Proving the continuity of the first derivative at the reverse transformation segmentation point includes: Similarly, the inverse transformation also has three intervals, y > UX, LX ≤ y ≤ UX, and y < LX; When y>UX: When LX ≤ y ≤ UX: f -1 (LX)=LX; f -1 (UX)=UX; When y < LX: Therefore, the inverse transformation process is continuous at the segmentation points y = LX and y = UX.
6. A method for realizing reversible transformation of bilaterally bounded variables to unbounded variables according to claim 1, characterized in that: In step S5, it is proved that the first derivative is continuous at the forward and reverse transformation segmentation points, including proving the continuity of the first derivative at the forward transformation segmentation point and proving the continuity of the first derivative at the reverse transformation segmentation point; among them, proving the continuity of the first derivative at the forward transformation segmentation point includes: The value range interval (LB, UB) of the two-sided bounded variable is divided into three parts, namely: (LB, LX), (LX, UX), and (UX, UB); therefore, there are two segmentation points LX and UX; For the case of the segmentation point x = LX: When LB < x < LX: When x → LX, the first derivative of the conversion function is: When LX ≤ x ≤ UX: y′ = f′(x) = 1; Therefore, the first derivative is continuous at the segmentation point x = LX; For the case of the segmentation point x = UX: When UX < x < UB: When x → UX, the first derivative of the conversion function is: Therefore, the first derivative is continuous at the segmentation point x = UX; Proving the continuity of the first derivative at the reverse transformation segmentation point includes: Similarly, the reverse transformation also has three intervals, namely y > UX, LX ≤ y ≤ UX, and y < LX; therefore, there are two segmentation points UX and LX; For the case of the segmentation point y = UX: When y > UX, the derivative function of the inverse transformation function is: When y → UX, the first derivative of the inverse transformation function is: When LX ≤ y ≤ UX: x′=[f -1 (y)]′=1; Therefore, the inverse transformation process is continuous at the segmentation point y = UX; For the case of the segmentation point y = LX: When y < LX: When y → LX, the first derivative of the inverse transformation function is: Therefore, the inverse transformation process is continuous at the segmentation point y = LX.
7. An electronic device, comprising a processor and a memory connected to the processor for storing instructions executable by the processor, characterized in that: The processor is used to execute the method for realizing the reversible conversion between the two-sided bounded variable and the unbounded variable according to any one of claims 1-6 above.
8. A server, characterized in that: It includes at least one processor and a memory communicatively connected to the processor. The memory stores instructions executable by the at least one processor. The instructions are executed by the processor so that the at least one processor executes the method for realizing the reversible conversion between the two-sided bounded variable and the unbounded variable according to any one of claims 1-6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for realizing the reversible transformation of bilaterally bounded variables and unbounded variables as described in any one of claims 1 to 6 is implemented.