A method and device for calculating percentile values of child growth and development data
Patent Information
- Application Number
- CN202611478800.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-22
- Publication Date
- 2026-10-27
AI Technical Summary
[0006]本发明所要解决的技术问题在于:现有按整月龄档位查表的做法因月龄取整而舍弃日尺度差异,同一档位内共用同一参照标准、相邻档位切换处参照标准整体跳变,导致百分位数值随月龄呈阶梯状不连续;以及现有百分位换算依赖预置的离散标准正态分位数表或专用统计函数库,需内置大规模数表并作二次查表插值,占用存储与查表开销、换算精度受数表粒度限制,难以在通用脚本运行环境中以纯算术运算完成端到端计算
Smart Images

Figure CN122991638A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to a numerical calculation technique for standardizing and converting children's growth and development measurement data. More specifically, it relates to a method and apparatus for calculating percentile values of children's growth and development data, applicable to percentile quantification of height and weight measurements in a physical examination data processing system. Background Technology
[0002] In the context of children's health data management, height and weight measurements are not inherently comparable—the same measurement value will have vastly different positions within the standard distribution of the same age group for different age groups and genders. Therefore, after entering a measurement value, the physical examination data processing system typically needs to convert it into a percentile value (often called a P-value in physical examinations), which is the proportion of that measurement value within the standard distribution of the same age and gender. This serves as a quantitative comparison indicator for subsequent recording and display. For example, in actual children's physical examinations, it is necessary to analyze the target individual's growth compared to their peers, i.e., to calculate their percentile on their growth curve. If the reference standard table is used to jump values in whole-month steps, it cannot continuously reflect the position of the measurement value within the peer group on a daily basis.
[0003] There are three main methods for obtaining percentile values. The first is to manually compare and read the values using printed standard percentile curves, where operators visually determine which two percentile curves the value falls between and estimate the reading. The second is to look up standard values in a table based on whole-month age ranges, first rounding the target subject's age to a specific whole-month range, and then comparing it with the standard parameter or standard percentile threshold value for that range. The third is to call the statistical function library provided by dedicated evaluation software or the operating environment, using the quantile function within it to complete the conversion.
[0004] The second approach most directly corresponds to the core improvement of this invention. This approach organizes standard growth and development data into a discrete gradation table based on whole months of age, with each gradation storing a set of standard parameters. During calculation, the age in months is first determined from the birth date and measurement date and rounded to the nearest whole month gradation. The standard parameters for that gradation are then directly used to complete the standardization conversion. Subsequently, a pre-set discrete standard normal quantile table is used for reverse lookup to map the standardization result to percentile values. The entire process consists of two discrete table lookups connected in series.
[0005] The above approach has two limitations. First, rounding down the age in months discards daily-scale differences: target subjects within the same age range who differ by nearly a month share the same set of reference standards, but the reference standards change drastically at the transition between adjacent age ranges, causing percentile values to be discontinuous with age in a step-like manner; even if the actual measurement value changes very little between two measurements of the same target subject crossing age range boundaries, a sudden change in value may occur that is inconsistent with the actual growth, thus compromising the comparability of the quantitative results. Second, the percentile conversion process relies on a pre-built discrete standard normal quantile table or a dedicated statistical function library: in the general scripting environments commonly used in physical examination data processing systems (i.e., runtime environments of general scripting languages such as PHP and Python), the former requires a considerable number of tables built into the system and secondary table lookup interpolation, occupying storage space and incurring lookup overhead, and the conversion accuracy is also directly limited by the granularity of the tables; the latter makes the system dependent on a specific software platform, making it difficult to complete end-to-end calculations within the system using pure arithmetic operations. Summary of the Invention
[0006] The technical problem to be solved by this invention is that: the existing method of looking up tables by whole month age discards the daily scale difference due to the rounding of month age, the same reference standard is used within the same level, and the reference standard jumps as a whole when switching between adjacent levels, resulting in the percentile value being discontinuous in a step-like manner with month age; and the existing percentile conversion relies on a pre-built discrete standard normal quantile table or a dedicated statistical function library, which requires the built-in large-scale data table and secondary table lookup interpolation, which occupies storage and table lookup overhead, and the conversion accuracy is limited by the granularity of the data table, making it difficult to complete end-to-end calculations with pure arithmetic operations in a general script running environment.
[0007] To address the aforementioned technical problems, this invention provides a method for calculating percentile values of children's growth and development data, comprising: obtaining the birth date, measurement date, gender identifier, measurement type, and measurement value of a target object, wherein the measurement value is the growth and development index detection value of the target object under the measurement type, the measurement type being height or weight, and the measurement value being the measured value corresponding to the measurement type; performing date difference decomposition on the birth date and the measurement date to obtain year, month, and day components, and summing them by month to obtain the precise age in months with decimals; based on the measurement type and the gender identifier, from a classification index parameter table with age in months as the primary key and parameter triplets consisting of skewness parameter, median parameter, and coefficient of variation parameter as key values, calculating the precise age in months relative to two adjacent age points. The positional proportion is determined by linearly interpolating the parameter triplets corresponding to the two adjacent two-month age points, parameter by parameter, to obtain the target parameter triplets. The skewness parameter, the median parameter, and the coefficient of variation parameter sequentially characterize the skewness, positional center, and dispersion of the standard distribution at that age point. Depending on whether the skewness parameter in the target parameter triplets is zero, a power transform or logarithmic transform is selected to convert the measured values into standardized deviation values. The standardized deviation value is a dimensionless quantity that measures the deviation of the measured value from the distribution center by a factor of the dispersion of the standard distribution after skew correction. The standardized deviation value is substituted into the polynomial approximation formula of the standard normal cumulative distribution to obtain the cumulative probability value. The cumulative probability value is symmetrically mapped according to the sign of the standardized deviation value to output the percentile value of the target object.
[0008] Further, the step of decomposing the date difference between the birth date and the measurement date to obtain year, month, and day components, and summing them by month to obtain the precise month age with a decimal, includes: calculating the date difference with the birth date as the starting point and the measurement date as the ending point; decomposing the date difference into whole years, whole months, and remaining days according to calendar carry rules, and recording the whole years, whole months, and remaining days as the year component, month component, and day component, respectively; summing the year component, month component, and day component by month to obtain the year-converted month number, whole-month-converted month number, and day-converted month number; and summing the year-converted month number, whole-month-converted month number, and day-converted month number to obtain the precise month age with a decimal.
[0009] Further, the step of converting the annual component, the monthly component, and the daily component into monthly equivalents to obtain the annual equivalent months, the whole-month equivalent months, and the daily equivalent months includes: multiplying the annual component by the number of months in each year to obtain the annual equivalent months; directly calculating the monthly component as the whole-month equivalent months; dividing the daily component by a preset average number of days in a month to obtain the daily equivalent months, wherein the daily equivalent months are decimals; the preset average number of days in a month is thirty, or is the ratio of the actual number of days in a calendar year to the number of months in each year; when the remaining number of days is zero, the daily equivalent months are set to zero, thus converting the precise month age with a decimal to an integer value.
[0010] Further, the step of obtaining the target parameter triplet by linearly interpolating the parameter triplets corresponding to the two adjacent age points according to the position ratio of the precise age relative to the two adjacent age points, based on the measurement type and the gender identifier, from the classification index parameter table with age point as the primary key and parameter triplets composed of skewness parameter, median parameter and coefficient of variation parameter as key values, includes: generating a composite index key based on the measurement type and the gender identifier; locating the parameter sub-table identified by the composite index key in the classification index parameter table; arranging all age points in the parameter sub-table in ascending order of value to obtain an ordered age key sequence; and retrieving the parameter triplet adjacent to the precise age in the ordered age key sequence. The preceding age point is used as the lower bound age point, and the next age point adjacent to the precise age is retrieved as the upper bound age point. When the lower bound age point is equal to the upper bound age point, the parameter triplet corresponding to the lower bound age point is directly used as the target parameter triplet. When the lower bound age point is not equal to the upper bound age point, the difference between the precise age and the lower bound age point is divided by the difference between the upper bound age point and the lower bound age point to obtain the position ratio. According to the position ratio, the skewness parameter, median parameter, and coefficient of variation parameter in the parameter triplet corresponding to the lower bound age point and the parameter triplet corresponding to the upper bound age point are linearly interpolated to obtain the target parameter triplet.
[0011] Further, the step of selecting a power transform or a logarithmic transform to convert the measured value into a standardized deviation value based on whether the skewness parameter in the target parameter triplet is zero includes: calculating the ratio of the measured value to the median parameter in the target parameter triplet to obtain a normalized measurement ratio; when the skewness parameter in the target parameter triplet is not zero, selecting the power transform, exponentiating the normalized measurement ratio with the skewness parameter as the exponent, subtracting one from the exponentiation result, and dividing it by the product of the skewness parameter and the coefficient of variation parameter to obtain the standardized deviation value; when the skewness parameter in the target parameter triplet is zero, selecting the logarithmic transform, and dividing the natural logarithm of the normalized measurement ratio by the coefficient of variation parameter in the target parameter triplet to obtain the standardized deviation value.
[0012] Further, when the skewness parameter in the target parameter triplet is not zero, the power transformation formula is selected, and the normalized measurement ratio is raised to the power of the skewness parameter as the exponent. The result of the power transformation is subtracted by one and then divided by the product of the skewness parameter and the coefficient of variation parameter to obtain the standardized deviation value. This includes: raising the normalized measurement ratio to the power of the skewness parameter in the target parameter triplet as the exponent to obtain a power transformation value; subtracting one from the power transformation value to obtain a power transformation offset; multiplying the skewness parameter in the target parameter triplet by the coefficient of variation parameter in the target parameter triplet to obtain a deviation scaling factor; dividing the power transformation offset by the deviation scaling factor to obtain the standardized deviation value; when the absolute value of the deviation scaling factor does not exceed a preset underflow threshold, the standardized deviation value is calculated by the logarithmic transformation formula, wherein the preset underflow threshold is set according to the floating-point representation precision of the operating environment.
[0013] Further, the step of substituting the standardized deviation value into the polynomial approximation of the standard normal cumulative distribution to obtain the cumulative probability value, and performing a symmetrical mapping of the cumulative probability value according to the sign of the standardized deviation value to output the percentile value of the target object includes: multiplying the absolute value of the standardized deviation value by a preset scaling coefficient, adding the multiplication result to one and taking the reciprocal to obtain an intermediate variable; calculating the first to fifth powers of the intermediate variable, multiplying the first to fifth powers of the intermediate variable by the corresponding preset first to fifth polynomial coefficients and summing them to obtain a polynomial weighted sum; calculating an exponent factor with the natural constant as the base and the negative half of the square of the standardized deviation value as the exponent; multiplying the preset normalization constant, the exponent factor, and the polynomial weighted sum, and subtracting the multiplication result from one to obtain the cumulative probability value; when the standardized deviation value is positive, multiplying the cumulative probability value by one hundred to obtain the percentile value; when the standardized deviation value is not positive, multiplying the difference between one and the cumulative probability value by one hundred to obtain the percentile value.
[0014] Furthermore, the classification index parameter table, which uses age points as the primary key and parameter triplets consisting of skewness parameters, median parameters, and coefficient of variation parameters as key values, is constructed from standard growth and development data in the following manner: The standard growth and development data is divided into multiple parameter sub-tables according to the combination of measurement type and gender identifier. Each parameter sub-table is identified by a composite index key formed by concatenating the values of the measurement type and the gender identifier. In each parameter sub-table, the discrete age values given by the standard growth and development data are used as age points, and these are arranged in ascending order to form an ordered age key sequence. The skewness parameter corresponding to each age point is... The median parameter and coefficient of variation parameter are encapsulated into parameter triples in a fixed order and stored with the age point as the primary key; the composite index key of each parameter sub-table is organized into a hash index to support direct location of the parameter sub-table by the combination of the measurement type and the gender identifier; the first and last age points of the ordered age key sequence of each parameter sub-table are recorded as the endpoints of the effective age interval of the parameter sub-table; when the precise age does not fall within the range defined by the endpoints of the effective age interval, the parameter triple corresponding to the age point with the shortest distance from the precise age among the endpoints of the effective age interval is taken as the target parameter triple.
[0015] Furthermore, the method further includes: encapsulating the precise age in months, the target parameter triplet, the standardized deviation value, and the percentile value into a structured calculation result record; associating the structured calculation result record with the object identifier of the target object and storing it in a growth and development assessment record table; when receiving multiple calculation requests for the same object identifier, reading multiple structured calculation result records in the growth and development assessment record table in ascending order of measurement date, extracting the percentile values from each structured calculation result record, and generating a time series sequence of the percentile values of the target object.
[0016] The present invention also provides a device for calculating percentile values of children's growth and development data, comprising:
[0017] The measurement data acquisition module is used to acquire the target object's date of birth, measurement date, gender identifier, measurement type, and measurement value. The measurement value is the growth and development index detection value of the target object under the measurement type, where the measurement type is height or weight, and the measurement value is the actual measured value corresponding to the measurement type.
[0018] The precise age calculation module is used to decompose the date difference between the birth date and the measurement date to obtain the year component, month component and day component, and sum them up by month to obtain the precise age in months with decimals;
[0019] The parameter interpolation module is used to linearly interpolate the parameter triplets corresponding to the two adjacent age points according to the measurement type and the gender identifier, based on the classification index parameter table with age point as the primary key and parameter triplet as the key value consisting of skewness parameter, median parameter and coefficient of variation parameter. The target parameter triplet is obtained by parameter-by-parameter linear interpolation according to the position ratio of the precise age point relative to the two adjacent age points. The skewness parameter, the median parameter and the coefficient of variation parameter respectively characterize the skewness, position center and dispersion of the standard distribution at the age point.
[0020] The deviation value conversion module is used to select either a power transform or a logarithmic transform based on whether the skewness parameter in the target parameter triplet is zero, and convert the measured value into a standardized deviation value. The standardized deviation value is a dimensionless quantity that measures the deviation of the measured value from the distribution center by a factor of the dispersion of the standard distribution after skew correction.
[0021] The percentile value output module is used to substitute the standardized deviation value into the polynomial approximation of the standard normal cumulative distribution to obtain the cumulative probability value, and to perform a symmetrical mapping on the cumulative probability value according to the sign of the standardized deviation value to output the percentile value of the target object. Attached Figure Description
[0022] Figure 1 A flowchart illustrating the method for calculating percentile values of children's growth and development data provided in this embodiment of the invention;
[0023] Figure 2 A schematic diagram illustrating the principle of the precise age calculation and parameter triplet linear interpolation steps provided in this embodiment of the invention;
[0024] Figure 3 A schematic diagram illustrating the principle of the standardized deviation value conversion and percentile value output steps provided in this embodiment of the invention;
[0025] Figure 4 This is a schematic diagram of the structure of the classification index parameter table provided in an embodiment of the present invention;
[0026] Figure 5 A schematic diagram of the module structure of the percentile value calculation device for children's growth and development data provided in an embodiment of the present invention;
[0027] Figure 6 This is a schematic diagram of a method for calculating percentile values of children's growth and development data provided in an embodiment of the present invention. Detailed Implementation
[0028] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. The described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] Example 1
[0030] like Figure 1 As shown in the figure, this embodiment provides a method for calculating percentile values of children's growth and development data, including:
[0031] S1: Obtain the target object's date of birth, date of measurement, gender identifier, measurement type, and measurement value. The measurement value is the target object's growth and development index detection value under the measurement type, where the measurement type is height or weight, and the measurement value is the actual measured value corresponding to the measurement type.
[0032] Data acquisition in this step can be achieved using conventional methods in the field, such as form submission, API calls, and database reading; this invention does not limit this method. The gender identifier is used to distinguish between the two standard distributions, and the measurement type is either height or weight.
[0033] Specifically, the above five input data items are presented in the following form in the physical examination data processing system: the birth date and the measurement date are given in the form of a calendar date consisting of three fields: year, month, and day. They can be carried by a date object provided by the operating environment, or by a string such as "YYYY-MM-DD" which is then parsed into a date object by the system; the gender identifier is an enumeration with a limited range of values. In one implementation, it is represented by two values: a first gender marker and a second gender marker, each corresponding to two independent standard distributions; the measurement type is also an enumeration, with values corresponding to either the first measurement type marker for height or the second measurement type marker for weight; the measurement value is a floating-point number, and its dimension depends on the measurement type. When the measurement type uses the first measurement type marker, the unit is centimeters, and when it uses the second measurement type marker, the unit is kilograms.
[0034] It should be noted that the difference in dimensions of the measured values will not be carried over to subsequent calculation steps. This is because the first operation performed in S4 is the division of the measured value with the median parameter in the target parameter triplet. This operation has eliminated the dimensions as a whole. Therefore, the two measurement types, height and weight, will share the same calculation path thereafter, and there is no need to maintain different conversion processes for different measurement types.
[0035] S2: Perform date difference decomposition on the birth date and the measurement date to obtain year, month and day components, and sum them up by month to obtain the accurate month age with decimals.
[0036] In this embodiment of the invention, the precise age in months with decimals refers to a time coordinate quantity scaled by months and retaining a decimal part. Its integer part represents the number of months the target object has fully experienced since its birth date, and its decimal part represents the proportion of days already experienced in the current month to the total month. Unlike the integer age in existing practices, which is used as a discrete grade number, the precise age in months with decimals is a continuous quantity. Measurements on different dates within the same whole-month interval correspond to different values. Therefore, it can serve as a continuous independent variable for subsequent positioning and interpolation on the age axis of standard data, rather than merely an integer index for selecting grades.
[0037] The mechanism of this step is to characterize the time position corresponding to a measurement onto a daily resolution, and then convert it into a decimal monthly age scale. Specifically, the date difference decomposition breaks down the interval between two dates into three components according to the calendar carry rule: the number of whole years, the number of whole months, and the number of remaining days. These three are respectively denoted as the year component, the month component, and the day component. Then, the year component is magnified to the number of months in a year, the month component is directly included in the number of months in a whole month, and the day component is divided by the preset average number of days in a month to obtain the number of months in a day in decimal form. The sum of the three is the precise monthly age with a decimal. This conversion relationship can be expressed as Equation (1):
[0038] Equation (1)
[0039] in, Indicates the precise age in months with a decimal. Indicates the amount of money in a year. Indicates the monthly quantity. Indicates the daily amount, This indicates the preset average number of days in a month.
[0040] The reason for retaining the decimal part instead of rounding the age to the nearest whole month, as is the current practice, is that the rate of change of standard growth and development data on the age axis is quite considerable in infancy—the difference in the median parameter between two adjacent whole-month intervals is often on the same order of magnitude as the actual growth of the target individual in a whole month. Because the precise age in months carries daily-scale information, the time coordinates used for subsequent retrievals are no longer rounded to discrete grid points, thus providing a prerequisite for eliminating the step-like discontinuity of percentile values with age; conversely, once rounded at this point, the daily-scale information is permanently discarded, and any subsequent interpolation cannot recover it.
[0041] It should be understood that the success of this mechanism relies on the inherent nature of the date difference decomposition process itself. Date difference decomposition does not simply divide the total number of days between two dates by a fixed month length constant. Instead, it first obtains the number of whole years and whole months according to calendar carry-over rules, then cancels out months of unequal length one by one, only assigning the remaining days that cannot be rounded to a preset average monthly number of days for calculation. The significance of this approach is that the accuracy of the integer part is entirely guaranteed by calendar rules, unaffected by the length differences between February and months with varying lengths; the approximation is limited to the decimal part, and its absolute value does not exceed one month. If the total number of days were divided by the month length constant instead, the error would accumulate linearly with the number of years, potentially reaching the order of months for school-age children, enough to cross a month's age point and lead to the selection of an incorrect interpolation interval.
[0042] Regarding the preset average number of days per month The value of is: taking 30 allows the conversion to be directly aligned with the output of commonly used date libraries, making it simple to implement; taking the ratio of the actual number of days in a calendar year to the number of months in a year (approximately 30.4375) ensures that the cumulative conversion error across long and short months does not drift with the year. The further the value of the daily component deviates from the actual average number of days in a month, the greater the deviation in the number of months contributed by the daily component. However, since the range of the daily number of months is no more than one month, the impact of this deviation on the accurate age of the month is always within the order of one month, and it is further compressed by the variation of the parameter within this range in subsequent interpolation.
[0043] In one example, the birth date of a target object is January 15, 2020, and the measurement date is February 4, 2023. The date difference decomposition yields a year component of 3, a month component of 0, and a day component of 20. Substituting into equation (1), we get (Month). If rounded according to the current practice, the target object will be classified into the 36-month range, and the 20-day time location information will be discarded entirely.
[0044] In another example, the difference for the same date Substituting into equation (1), we get (Month), and take The obtained value of 36.6667 differs by 0.0096 months, which is approximately 0.29 days. It is evident that the difference in precise month age caused by the two values is far smaller than the interval between adjacent month age points, and will not lead to misselection of the interpolation interval, only producing a negligible difference in the interpolation weight. This comparison demonstrates that the two values of the preset average number of days per month do not substantially affect the effectiveness of the present invention, and can be selected based on the date interface provided by the operating environment during implementation.
[0045] Through the above mechanism, the technical effect achieved in this step is that the position of a single measurement on the gestational age axis is uniquely and continuously determined. Compared with existing practices, the difference can be intuitively seen from the processing results of two adjacent dates—under existing practices, if two measurements of the same target object on the 14th and 15th of a month happen to cross the division of the rounding range, they will be judged as belonging to different ranges, and the reference standard will be changed entirely; however, under this step, the precise gestational age obtained from these two measurements differs by only about 0.033 months, and the reference standard used subsequently is only slightly adjusted proportionally, without being completely changed.
[0046] S3: Based on the measurement type and the gender identifier, from the classification index parameter table with age point as the primary key and parameter triples consisting of skewness parameter, median parameter and coefficient of variation parameter as key values, linearly interpolate the parameter triples corresponding to the two adjacent age points parameter by parameter according to the position ratio of the precise age relative to the two adjacent age points to obtain the target parameter triples. The skewness parameter, the median parameter and the coefficient of variation parameter sequentially characterize the skewness, position center and dispersion of the standard distribution at the age point.
[0047] The classification index parameter table is an organizational form of standard growth and development data: it is divided into tables according to a combination of measurement type and gender identifier. The table uses age in months as the primary key, and each age point contains a parameter triple consisting of a skewness parameter, a median parameter, and a coefficient of variation parameter in a fixed order. These three parameters respectively characterize the skewness, centrality, and dispersion of the standard distribution at that age point (i.e., the three parameters of the LMS method commonly used in child growth assessment, where the skewness parameter is the exponent of the power transformation rather than the statistically significant skewness coefficient). In this embodiment, they are denoted as follows: , , .
[0048] Furthermore, the parameter-wise linear interpolation refers to the following: the three parameters in the parameter triplet are not treated as an indivisible whole, but rather each parameter is independently interpolated linearly between the values at the lower bound gestational age point and the values at the upper bound gestational age point, according to the same positional proportion, thereby synthesizing a parameter triplet that does not originally exist in the standard data and is specific to the current precise gestational age. Essentially, it reconstructs the standard data from a "discrete set of values at gestational age points" into a "piecewise linear continuous function on the gestational age axis," and then takes values on this continuous function according to the precise gestational age.
[0049] The mechanism of this step is broken down as follows: a composite index key is generated using the measurement type and gender identifier, and the corresponding parameter sub-table is located; within the table, adjacent lower and upper bound age points are determined based on the precise age; the positional ratio of the precise age between these two age points is calculated; and linear interpolation is performed independently on the three parameters at each of the two endpoints according to this positional ratio. The positional ratio and parameter-by-parameter interpolation can be expressed as equations (2) and (3):
[0050] Equation (2)
[0051] Equation (3) , ,
[0052] in, Indicates positional proportion. Indicates the lower bound age point, Indicates the upper bound of the age point in months; , , The parameters are skewness, median, and coefficient of variation, respectively, representing the lower bound age point. , , These represent the skewness parameter, median parameter, and coefficient of variation parameter corresponding to the upper bound age point, respectively. , , These represent the skewness parameter, median parameter, and coefficient of variation parameter in the target parameter triplet, respectively.
[0053] The significance of using parameter-by-parameter interpolation instead of taking the endpoints globally lies in the fact that the three parameters of the standard distribution each have different trends along the age axis—the median parameter monotonically increases, the coefficient of variation parameter fluctuates slowly with age, and the skewness parameter may change sign. If the triplets from a single endpoint were used globally, the age mismatch of all three parameters would simultaneously affect the subsequent standardization transformation. By performing linear interpolation on each of the three parameters according to the same positional proportion, the position, dispersion, and skewness of the reference distribution evolve synchronously and continuously with the precise age, thus making the output percentile values a continuous function of the precise age, and eliminating step-like jumps in mechanism. Positional proportion The value range is from 0 to 1. When the target parameter triplet approaches 0, the parameter triplet approaches the lower bound of the age point. When the parameter triplet approaches 1, it approaches the upper bound of the age point. Since the two ends are continuously connected, the interpolation results of adjacent intervals take the same value at the age point and no new breakpoints are generated.
[0054] It is worth noting that the aforementioned property of "continuous connection at both ends" can be directly verified by equation (3): when the precise age approaches the upper bound age point from within the interval, the position ratio approaches 1, and the three parameters obtained by equation (3) successively approach the three parameters of the upper bound age point itself; while when the precise age approaches the same age point from within the next interval, that age point acts as the lower bound age point in the next interval, the position ratio approaches 0, and the three parameters obtained by equation (3) also approach the three parameters of that age point itself. Since the limits on both sides are consistent, the entire piecewise linear function is continuous at all age points, and interpolation will not introduce new breakpoints at the joints between intervals. This is the key difference between this mechanism and "piecewise rounding"—piecewise rounding is also a piecewise function, but its limits on both sides are not equal at the joints between segments, and the breakpoints are generated precisely here.
[0055] In this embodiment of the invention, the data format within the parameter sub-table can be illustrated as follows. Taking the parameter sub-table corresponding to the first measurement type marker and the first gender marker as an example, its parameter triplets at several starting age points are: age point 0 corresponds to skewness parameter 1, median parameter 49.8842, and coefficient of variation parameter 0.03795; age point 1 corresponds to skewness parameter 1, median parameter 54.7244, and coefficient of variation parameter 0.03557; age point 2 corresponds to skewness parameter 1, median parameter 58.4249, and coefficient of variation parameter 0.03424 (the above are all exemplary values and are not intended to limit the invention). As can be seen from this set of examples, the difference in median parameter between adjacent age points can reach 4.8 units, which is on the same order of magnitude as the actual growth of the target object in one month. This is the direct reason why rounding the age affects the conversion result.
[0056] In another example, the parameter triplets corresponding to the second measurement type marker and the first gender marker at the same age point are as follows: Age point 0 corresponds to skewness parameter 1, median parameter 3.3464, and coefficient of variation parameter 0.14602; Age point 1 corresponds to skewness parameter 1, median parameter 4.4709, and coefficient of variation parameter 0.13395; Age point 2 corresponds to skewness parameter 1, median parameter 5.5675, and coefficient of variation parameter 0.12385 (these are all exemplary values). Comparing this set of values with the previous set, it can be seen that the magnitude of the coefficient of variation parameter differs by about 3.8 times between the two measurement types, and the dimensions of the median parameter are also different. Therefore, it is necessary to store the parameters separately according to the combination of measurement type and gender identifier: if they are stored in mixed tables, multiple sets of parameter triplets with different meanings will appear under the primary key of the same age point, the primary key will lose its uniqueness, and the search results will be uncertain.
[0057] Following the example of S2, precise age in months The measurement type is height, and the gender identifier corresponds to the primary gender. After locating the corresponding parameter sub-table, the results are obtained. , The parameter triples at the two endpoints are respectively , , and , , (Example values, not limited). From equation (2), we get Substituting into equation (3), we get , , .
[0058] Preferably, to visually illustrate the continuity of this step, a comparison can be made between the percentile values obtained by the present invention and the existing rounding method for the same measurement value within the 36- to 37-month interval. Assuming the measurement value is 95.5, using the example parameters described above, when the precise age in months is successively taken as 36.0000, 36.2000, 36.4000, 36.4999, 36.5000, 36.6667, 36.8000, and 37.0000, the percentile values obtained by the present invention are approximately 43.98, 43.19, 42.42, 42.03, 42.03, 41.39, and 40, respectively. The values at 88 and 40.12 show a monotonically smooth decrease with age; however, the percentile values obtained using existing rounding methods are approximately 43.98, 43.98, 43.98, 43.98, 40.12, 40.12, 40.12, and 40.12, respectively. A mutation occurs at approximately 3.86 percentiles between the precise ages of 36.4999 and 36.5000, resulting in different quantification results for two time points less than a day apart. The above comparative values are exemplary values calculated using the example parameters of this embodiment, used to illustrate the differences in mechanism and not to limit the invention.
[0059] S4: Depending on whether the skewness parameter in the target parameter triplet is zero, select a power transform or a logarithmic transform to convert the measured value into a standardized deviation value. The standardized deviation value is a dimensionless quantity that measures the deviation of the measured value from the distribution center by a factor of the standard distribution after skew correction, using the degree of dispersion of the standard distribution as the unit.
[0060] In this embodiment of the invention, the standardized deviation value refers to the dimensionless deviation measure (commonly known as the Z-value) after skew correction. Its numerical meaning is: the multiple by which the measured value deviates from the center of the standard distribution for the same age and sex, measured in units of the dispersion of the distribution. A standardized deviation value of zero indicates that the measured value is exactly at the center of the distribution, a positive value indicates it is above the center, and a negative value indicates it is below the center. The larger the absolute value, the greater the deviation. It is called "skew-corrected" because the standard distribution of growth and development measurement data is usually not symmetrical. Directly subtracting the center from the measured value and then dividing by the dispersion will produce a systematic bias at the tail of the distribution. The power transform and logarithmic transform first transform the skewed distribution into an approximately symmetrical distribution, and then standardize it, so that the standardized deviation value can directly correspond to the quantiles of the standard normal distribution.
[0061] This step converts the measurement values with different dimensions into a dimensionless standardized deviation value, which represents the deviation factor of the measurement value from the center of the standard distribution of the same age and sex. The mechanism first calculates the ratio of the measurement value to the median parameter to obtain the normalized measurement ratio, and then selects two complementary transformation paths according to whether the skewness parameter is zero: when the skewness parameter is not zero, the power transformation is used, as shown in equation (4); when the skewness parameter is zero, the logarithmic transformation is used, as shown in equation (5).
[0062] Equation (4)
[0063] Equation (5)
[0064] in, Indicates the measured value. Indicates the standardized deviation value. , , The meaning is the same as in formula (3).
[0065] The necessity of branching stems from the fact that the denominator of equation (4) contains a skewness parameter. :when When the denominator of equation (4) is zero, the operation cannot be completed; while... At the limit approaching zero, Converging exactly at Therefore, equation (5) is a continuous extension of equation (4) at the degenerate point, rather than a completely new approximation. Since the skewness parameter being zero is used as the branch criterion and the degenerate case is handled by a logarithmic transformation, the transformation is defined everywhere in the entire skewness parameter range and follows... This continuity avoids calculation interruptions or numerical jumps caused by parameter interpolation falling exactly at the zero skewness point—a point that is particularly necessary in the context of this invention's precise monthly age interpolation: existing methods of taking parameters based on whole months of age only encounter a limited number of skewness values in the original standard data, while interpolation produces continuously changing skewness parameters, thus increasing the possibility of hitting the zero point.
[0066] The judgment that "interpolation increases the probability of reaching zero" can be explained as follows. The skewness parameter in the standard growth and development data is not always positive or negative on the age axis. It will change from positive to negative or from negative to positive in certain age intervals. Between the pair of adjacent age points where the sign changes, linear interpolation according to equation (3) must have a precise age value that makes the interpolation result exactly zero. The existing approach only takes values at discrete age points. Unless the standard data itself gives zero skewness at a certain age point, the degradation point will never be encountered. However, the precise age of the present invention is a continuous quantity. It is normal for it to fall into the above-mentioned zero-crossing interval, and it is also possible for it to fall near the zero-crossing point. Therefore, the branch criterion in the present invention is not a formal protection that is not used, but a necessary component to ensure that the scheme is executable on the entire age axis.
[0067] Regarding the implementation of the branch criterion, the strict zero-equal judgment is too harsh under floating-point operations. The criterion can be relaxed to whether the absolute value of the product of the skewness parameter and the coefficient of variation parameter exceeds a preset underflow threshold. This threshold is set according to the floating-point representation precision of the operating environment. For example, it can be taken as one hundred times the floating-point machine precision of the operating environment. If the value is too small, the denominator of equation (4) will underflow and the result will be distorted when it is close to zero skewness. If the value is too large, it will switch to equation (5) too early in the interval where the skewness parameter can still participate in the operation normally, introducing unnecessary approximation deviation.
[0068] Following the example in S3, , , Measured values ,because If the expression is not zero, proceed to equation (4) to obtain... , .
[0069] S5: Substitute the standardized deviation value into the polynomial approximation of the standard normal cumulative distribution to obtain the cumulative probability value, perform a symmetrical mapping on the cumulative probability value according to the sign of the standardized deviation value, and output the percentile value of the target object.
[0070] In this embodiment of the invention, the polynomial approximation of the standard normal cumulative distribution is an analytical calculation formula that approximates the cumulative probability of the standard normal distribution using elementary operations. The cumulative probability of the standard normal distribution itself does not have a closed-form expression in elementary function form; therefore, existing methods typically involve looking up a pre-defined table. The idea behind the polynomial approximation is to first construct an intermediate variable whose values are compressed to a finite interval using the absolute values of the standardized deviations, and then approximate the area at the tail of the distribution by multiplying the weighted sum of the lower powers of this intermediate variable by a Gaussian exponential factor. The relationship between the polynomial approximation and the table lookup method is one of substitution rather than approximation—neither provides precise values. The difference lies in that the error of the former is determined by the order of the approximation formula itself and is uniformly bounded across the entire axis, while the error of the latter is determined by the granularity of the table and the quadratic interpolation method and fluctuates with the position of the value.
[0071] This step converts the standardized deviation value into a percentile value. The mechanism is decomposed into four steps: constructing an intermediate variable using the absolute value of the standardized deviation value; obtaining a polynomial weighted sum by weighting the first to fifth powers of the intermediate variable; calculating the Gaussian exponential factor; combining the three to obtain the cumulative probability value, and then performing a symmetric mapping according to the sign of the standardized deviation value. The corresponding expressions are shown in equations (6) to (9):
[0072] Equation (6)
[0073] Equation (7)
[0074] Equation (8)
[0075] Equation (9) ( When it is a positive number); ( (When not positive)
[0076] in, Indicates intermediate variables. This represents the preset scale coefficient. This represents a polynomial weighted sum. to These represent the coefficients of the first to the fifth polynomials, respectively. Indicates a preset normalization constant and , Represents the cumulative probability value. This represents the percentile value. The meaning is the same as in formula (4).
[0077] The basis for symmetric mapping lies in the symmetry of the standard normal distribution about the origin: Equations (6) to (8) use the absolute value of the standardized deviation as the independent variable, giving only the cumulative probability value on the positive half-axis side, and the negative half-axis side is obtained by subtracting the cumulative probability value from the symmetry. Therefore, Equation (9) is divided into two branches according to the sign. Since the entire conversion path consists only of absolute value, multiplication and division, reciprocal, integer power and exponentiation operations, the percentile value can be directly calculated by basic arithmetic operations in the general script running environment, thus eliminating the need for built-in and secondary lookup table interpolation of the discrete standard normal quantile table, and also eliminating the dependence on calling special statistical function libraries. Moreover, the conversion accuracy is determined by the inherent accuracy of polynomial approximation and is no longer limited by the granularity of the numerical table.
[0078] It should be noted that the storage overhead resulting from the above effect can be estimated as follows. If a lookup table method were used to achieve a resolution comparable to this step, the standard normal quantile table would require storing probability values point-by-point within the commonly used range of standardized deviations, with thousands of entries. In contrast, this step only requires storing seven floating-point numbers: the preset scaling coefficient, the coefficients of the first to fifth polynomials, and the preset normalization constant. The difference is three orders of magnitude. More importantly, the lookup table method still requires interpolation between two entries, which introduces a quadratic error related to the table step size. This step, however, directly evaluates at any standardized deviation, eliminating this source of error.
[0079] Furthermore, there is a clear connection between this step and S4: the standardized deviation value output by S4 is a dimensionless quantity with reference to the standard normal distribution, and this step calculates the probability according to the standard normal cumulative distribution. If S4 uses a different reference distribution, the approximation formula in this step must also be changed accordingly. It is the skew correction performed by the power transform and logarithmic transform in S4 that allows the output of S4 to be treated as a standard normal variable in this step, and the two steps are closed in terms of data meaning.
[0080] Regarding parameter values: and to These are the intrinsic coefficients of the polynomial approximation, in one implementation... Take 0.2316419, to Taking values of 0.319381530, -0.356563782, 1.781477937, -1.821255978, and 1.330274429 respectively, the absolute error of the approximation formula across all axes is on the order of 10 to the power of -7. For percentile values, this is far superior to the granularity of commonly used discrete number tables, thus the output can retain two decimal places. Using an approximation formula with more terms can further reduce the error, but the benefit is limited for the required precision in this scenario, while the computational load increases.
[0081] Following the example in S4, From equation (6), we get From equation (7), we get , From equation (8), we get ;because Since it is not a positive number, we can obtain from equation (9) In contrast, if the target group were categorized into the 36-month age group according to the existing practice of classifying age groups by full month, the result would be... If it is classified into the 37 month range, then... There is a difference of about 3.9 percentiles between two adjacent gear positions, and this difference appears in the form of abrupt change at the gear position boundary; while the 41.39 obtained by interpolation based on the precise age of 36.6667 in this embodiment falls between the two and moves continuously between the two gear positions with the precise age of 36.6667.
[0082] To verify the correctness of the entire path in this embodiment, the output of equation (9) can be compared with the standard normal cumulative probability directly calculated by the high-precision error function. In this example... For example, the percentile value calculated by the high-precision error function is about 41.3877, which is consistent with 41.39 obtained by equations (6) to (9) with two decimal places. This shows that the error of the polynomial approximation path is much smaller than the output precision and does not have a practical impact.
[0083] Example 2
[0084] like Figure 2 As shown, based on Example 1, S2 involves decomposing the date difference between the birth date and the measurement date to obtain year, month, and day components, and summing them by month to obtain the precise age in months with a decimal, including:
[0085] S2.1: Calculate the date difference starting from the birth date and ending from the measurement date. Decompose the date difference into whole years, whole months, and remaining days according to the calendar carry-over rule. Record the whole years, whole months, and remaining days as the year component, month component, and day component, respectively.
[0086] The calendar carry-over rule refers to the following: First, compare the day fields of the two dates. If the day field of the measurement date is less than the day field of the birth date, borrow from the month field, taking the actual number of days in the starting month. Then, compare the month fields. If the month field is insufficient, borrow twelve months from the year field. This decomposition method restricts the range of remaining days to the actual number of days in the starting month, aligning with the subsequent calculation based on the preset average number of days per month.
[0087] In one example, if the birth date is January 15, 2020, and the measurement date is February 4, 2023, the day field 4 is less than 15. Therefore, a borrow is made from the month field, borrowing the actual number of days in the starting month, January (31 days), resulting in the remaining number of days. The day; month field is borrowed for one month after the month is No need to borrow from the year field again; the year field is Therefore, the decomposition results in 3 whole years, 0 whole months, and 20 remaining days, which are respectively recorded as the year component, month component, and day component.
[0088] This step can be achieved by directly calling the date object difference interface provided by the runtime environment. This type of interface usually has the above calendar carry rules built in and directly returns the three components of year, month and day, without the need for the system to implement the carry logic separately.
[0089] S2.2: Convert the annual component, the monthly component, and the daily component into monthly components to obtain the number of months converted from the year, the number of months converted from a whole month, and the number of months converted from the day.
[0090] The three components have different dimensions and must be unified to the monthly scale before they can be summed. Specifically, the year component is in years, the month component is in months, and the day component is in days; they cannot be directly added together. The purpose of this step is to convert both the year and day units to the common monthly scale, making the summation in S2.3 a single addition of units of the same dimension. The conversion relationship between years and months is a precise fixed multiple, while the conversion relationship between days and months requires the use of a pre-agreed monthly length constant. This is why only the day is converted to a decimal number of months among the three components. The specific calculation relationship for this conversion is explained in Example 3.
[0091] S2.3: Sum the number of months converted from the year, the number of months converted from the whole month, and the number of months converted from the day to obtain the precise month age with a decimal.
[0092] The integer part of the summation result comes from the number of months converted from a year and the number of months converted from a whole month, while the decimal part comes only from the number of months converted from a day. Therefore, the decimal places of the precise month age precisely carry the time information on a day-scale.
[0093] It should be understood that this property of "separating the sources of the integer part and the fractional part" has practical significance: it ensures that the accurate monthly age obtained by the present invention, after rounding, is necessarily equal to the whole monthly age used in the existing practice, and there will be no misalignment between the two in the whole monthly interval. Therefore, the present invention can smoothly replace the original monthly age calculation step in the existing physical examination data processing system. After the historical data is recalculated according to the new method, it falls within the same whole monthly interval as the original result, only being more precise in the value within the interval.
[0094] Example 3
[0095] Based on Example 2, the step S2.2, which involves converting the annual component, the monthly component, and the daily component to monthly values to obtain the number of months converted from the year, the number of months converted from a whole month, and the number of months converted from the day, includes:
[0096] S2.2.1: Multiply the annual component by the number of months in each year to obtain the converted number of months in the year.
[0097] S2.2.2: The monthly component is directly counted as the number of months converted to the whole month.
[0098] S2.2.3: Divide the daily component by the preset monthly average number of days to obtain the daily converted month number, which is a decimal.
[0099] S2.2.4: The preset average number of days per month is thirty, or it is the ratio of the actual number of days in a calendar year to the number of months in each year.
[0100] S2.2.5: When the remaining number of days is zero, the day-to-month conversion is set to zero, so that the precise month age with decimals degenerates into an integer value.
[0101] The above five sub-steps together constitute the executable form of equation (1): S2.2.1 corresponds to the part in equation (1). Item S2.2.2 corresponds to Items S2.2.3 and S2.2.4 correspond to each other. The terms and their denominators are defined in S2.2.5, which describes a boundary case where the day field of the measurement date and the birth date are exactly the same. The day component is zero, the day-to-month conversion is zero, and the precise month age degenerates into an integer value. In this case, the calculation path of this invention and the method of using parameters based on whole month age give the same result, and the two are continuously connected at this point. This property indicates that this invention does not replace the whole month age scale with another scale, but rather continuously encrypts the whole month age scale on the day scale.
[0102] In S2.2.1, the number of months in each year is set to twelve. This value is a fixed attribute of the Gregorian calendar and does not change with the year; therefore, the calculation of the number of months converted from a year does not introduce any approximation. In contrast, the preset average number of days per month in S2.2.3 is not a fixed attribute. The actual length of a calendar month varies between 28 and 31 days, so a conventional value must be used instead. This is why, among the three conversion quantities, only the number of months converted from a day contains an approximation component. As mentioned earlier, this approximation component is limited to a range of no more than one month by the calendar carry-over rules and does not accumulate with the number of years.
[0103] In one example, the birth date of a target object is January 15, 2020, and the measurement date is January 15, 2023. The day field of both dates is the same. The date difference decomposition yields a year component of 3, a month component of 0, and 0 remaining days. From S2.2.1, the number of months converted from the year is... From S2.2.2, the number of months converted to whole months is 0. From S2.2.5, the number of months converted to day is set to zero. Summing these three values gives the precise age in months as 36.0000, which is an integer value. At this point, both the lower and upper bound age points in subsequent S3 are located at age point 36. The calculation of the position ratio is skipped by the equality branch in S3.4, and the parameter triplet of age point 36 is directly used, which is completely consistent with the existing practice of using parameters according to whole age levels.
[0104] It should be noted that the aforementioned degradation scenario is not an uncommon exception: in physical examination data processing systems, re-examinations scheduled at fixed intervals often have the same or similar day field as the initial measurement date, thus this branch is frequently triggered in actual operation. S2.2.5 explicitly specifies this scenario and sets it to zero to avoid the extremely small non-zero residuals generated by floating-point division (such as when the day component is zero, if division is still performed without setting it to zero, a result resembling negative zero may be obtained under certain operating conditions) being passed into subsequent interpolation stages.
[0105] Preferably, when S2.2.4 takes the preset monthly average number of days as the ratio of the actual number of days in a calendar year to the number of months in a year, this ratio can be calculated based on the average length of a common year and a leap year in the Gregorian calendar, that is, 365.2425 divided by 12, which gives approximately 30.4375. Continuing with the example of 20 days in Example 1, the number of months converted from 30 hours is 0.6667, and when taken as 30.4375, it is 0.6571, with a difference of 0.0096 months. This difference is reflected in the positional proportion of S3 as a deviation of approximately 0.0096, and further reflected in the parameter triplet as approximately one percent of the endpoint difference. The impact on the final percentile value is below the second decimal place, without changing the two decimal places of the output result.
[0106] Example 4
[0107] Based on Example 1, in S3, according to the measurement type and the gender identifier, from the classification index parameter table with age as the primary key and parameter triples consisting of skewness parameter, median parameter, and coefficient of variation parameter as key values, the parameter triples corresponding to the two adjacent age points are linearly interpolated parameter by parameter according to the position ratio of the precise age relative to the two adjacent age points to obtain the target parameter triples, including:
[0108] S3.1: Generate a composite index key based on the measurement type and the gender identifier, and locate the parameter sub-table identified by the composite index key in the classification index parameter table.
[0109] The composite index key is formed by concatenating the values of the measurement type and the gender identifier in a fixed order. In one example, when the measurement type value is the first measurement type marker and the gender identifier value is the first gender marker, the composite index key is the string obtained by concatenating the two with a separator.
[0110] Specifically, constructing a composite index key using string concatenation instead of two-dimensional array subscripts has the advantage that if the set of values for measurement type and gender identifier is expanded in the future, there is no need to change the table structure and retrieval logic. Only a new composite index key needs to be generated according to the same concatenation rule and attached to the hash index. At the same time, the overhead of single-level hash lookup is lower than that of dereferencing array subscripts layer by layer, and there will be no gaps due to the missing value of a certain dimension.
[0111] S3.2: Arrange all the age points in the parameter sub-table in ascending order of their values to obtain an ordered age key sequence.
[0112] The key order of standard growth and development data during entry is not necessarily ordered; ascending order is a prerequisite for subsequent numerical delimitation. This sequence is generated and resides once during parameter table construction and is not repeatedly sorted with each calculation.
[0113] It is worth noting that the timing of sorting has a significant impact on system overhead. If the key set of the parameter partition table is reordered in each calculation request, each request incurs sorting overhead related to the number of age points, and this overhead is completely repeated if the content of the parameter partition table remains unchanged. In this embodiment, sorting is brought forward to the parameter partition table construction stage and the results are stored there, so that each calculation request only incurs retrieval overhead once. The ordered age key sequence is an inherent component of the parameter partition table and resides there permanently. Its construction process is described in Embodiment 8.
[0114] S3.3: In the ordered age key sequence, retrieve the previous age point adjacent to the precise age as the lower bound age point, and retrieve the next age point adjacent to the precise age as the upper bound age point.
[0115] The retrieval can be achieved by sequential traversal, or by using the monotonicity of the ordered age key sequence to achieve binary search. The latter can reduce the number of comparisons from linear to logarithmic when the parameter partitioning is large.
[0116] Specifically, let the length of the ordered age key sequence be... The number of comparisons required for sequential traversal is equal to... Proportional to the number of comparisons required for binary search. It is proportional to the base-2 logarithm. In one implementation, the parameter table covers ages from 0 to 60 months, with data points distributed according to one age point per month. Using 61, the two implementations involve approximately 61 and 6 comparisons respectively; in another implementation, the parameter table is distributed periodically during infancy to improve resolution. The number of comparisons can be increased to over 300. The two implementations involve approximately 300 and 9 comparisons respectively, demonstrating that the advantage of binary search becomes significant with increasing scale. During implementation, the appropriate method can be chosen based on the actual size of the parameter table and the frequency of calls in the operating environment; this invention does not impose any limitations on this.
[0117] S3.4: When the lower bound age point is equal to the upper bound age point, the parameter triplet corresponding to the lower bound age point is directly used as the target parameter triplet.
[0118] This situation occurs when the precise age falls exactly at a certain age point. In this case, there is no need for interpolation, and the value can be directly taken, thus avoiding division by zero in subsequent position ratio calculations.
[0119] This branch corresponds to the degradation scenario described in S2.2.5: when the daily component is zero, the precise age is taken as an integer value; if the precise age of the integer value happens to be a certain age point in the parameter sub-table, then this branch is triggered. The combination of these two points ensures that the behavior of this invention in the degradation scenario is completely consistent with the existing practice of taking parameters by integer age increments, guaranteeing backward compatibility of the results and eliminating an unnecessary interpolation operation.
[0120] S3.5: When the lower bound age point is not equal to the upper bound age point, divide the difference between the precise age and the lower bound age point by the difference between the upper bound age point and the lower bound age point to obtain the position ratio.
[0121] That is, the relationship expressed by equation (2). When the intervals between adjacent age points in the ordered age key sequence are not equal, this equation still holds, because it uses the actual interval as the denominator.
[0122] It should be understood that non-equidistant point placement is a common form in standard growth and development data: the growth rate is fast in infancy, and standard data is often placed at fine intervals; the growth rate slows down in school-age children, and the point spacing is widened accordingly. Equation (2) uses the actual difference between two adjacent two-month age points as the denominator, so that the position ratio is always the relative position within the interval rather than the absolute time quantity. Therefore, regardless of whether the points are equidistant, the value range of the position ratio is always 0 to 1, and the meaning of the interpolation weight in the subsequent equation (3) remains consistent, without the need to maintain different conversion coefficients for different intervals.
[0123] S3.6: According to the position ratio, perform linear interpolation on the skewness parameter, median parameter and coefficient of variation parameter in the parameter triplet corresponding to the lower bound age point and the parameter triplet corresponding to the upper bound age point to obtain the target parameter triplet.
[0124] That is, the three independent interpolation relationships expressed by equation (3). The three share the same position ratio, so the target parameter triplet as a whole maintains the same time coordinate with the accurate age, and there is no age mismatch between the parameters.
[0125] Preferably, the interpolation of the three parameters can be completed in a single traversal: since the parameter triples are encapsulated in a fixed order, the same form of linear interpolation operation can be performed sequentially on the three positions of the triples, without needing to take values one by one according to the parameter name, thereby decoupling the implementation of this step from the specific semantics of the parameter triples. If a certain parameter has the same value throughout the entire parameter table (such as the skewness parameter being 1 at several age points in the example data), the interpolation result will necessarily be equal to that value. In implementation, such cases can be short-circuited to save one multiplication-addition operation, but this optimization does not change the calculation result, and the present invention does not limit whether to use it.
[0126] Example 5
[0127] like Figure 3 As shown, based on Example 1, step S4, which involves selecting either a power transform or a logarithmic transform to convert the measured value into a standardized deviation value based on whether the skewness parameter in the target parameter triplet is zero, includes:
[0128] S4.1: Calculate the ratio of the measured value to the median parameter in the target parameter triplet to obtain the normalized measurement ratio.
[0129] This ratio eliminates the dimensions of the measured values, allowing both height and weight measurements to be processed through the same subsequent path.
[0130] In this embodiment of the invention, a normalized measurement ratio of one indicates that the measured value is exactly equal to the median parameter; a value greater than one indicates that the measured value is above the median; and a value less than one indicates the opposite. Continuing with the example of Embodiment 1, when the measured value is 95.5 cm and the median parameter is 96.3667, the normalized measurement ratio is 0.991007; if the measurement type is changed to weight, and the measured value is 14.2 kg and the median parameter is 14.3000, the normalized measurement ratio is 0.993007. Although the two ratios come from two measurements with completely different dimensions, they are on the same order of magnitude and have the same interpretation method. This is a direct manifestation of dimensionless measurement and a prerequisite for subsequent steps S4.2 and S4.3 to not need to distinguish between measurement types.
[0131] S4.2: When the skewness parameter in the target parameter triplet is not zero, select the power transformation formula, use the skewness parameter as the exponent to perform a power operation on the normalized measurement ratio, subtract one from the power operation result, and divide it by the product of the skewness parameter and the coefficient of variation parameter to obtain the standardized deviation value.
[0132] That is, equation (4). The exponentiation operation here is responsible for correcting the skewness of the standard distribution, and the specific calculation process is shown in Example 6.
[0133] Specifically, when the skewness parameter is positive, the exponentiation operation compresses the side with the normalized measurement ratio greater than one and stretches the side with the ratio less than one, thereby pulling the right-skewed distribution back to approximately symmetry; when the skewness parameter is negative, the opposite direction of action is used to correct the left-skewed distribution; when the skewness parameter is exactly one, the exponentiation operation degenerates into an identity transformation, and equation (4) simplifies to the normalized measurement ratio minus one and then divided by the coefficient of variation parameter, that is, pure standardization without skew correction. In the example data cited in Example 1, the skewness parameter is always 1, which belongs to this simplified case.
[0134] S4.3: When the skewness parameter in the target parameter triplet is zero, select the logarithmic transformation formula, divide the natural logarithm of the normalized measurement ratio by the coefficient of variation parameter in the target parameter triplet, and obtain the standardized deviation value.
[0135] That is, equation (5). In other implementations, this step can also be implemented using an equivalent series expansion based on the natural logarithm to adapt to operating environments that do not have high-precision logarithmic functions.
[0136] It should be noted that equation (5) corresponds to the case where the standard distribution follows a log-normal pattern. In this case, the measured value itself does not follow a normal distribution, but its logarithm does. Therefore, the standardized deviation value is obtained by first taking the logarithm and then dividing it by the coefficient of variation parameter. When the operating environment only provides a logarithmic function with base 10, the natural logarithm can be converted according to the base-change relationship. The base-change constant is stored as a preset floating-point number without changing the result of equation (5).
[0137] Example 6
[0138] Based on Example 5, in S4.2, when the skewness parameter in the target parameter triplet is not zero, the power transformation formula is selected, and the normalized measurement ratio is raised to the power with the skewness parameter as the exponent. The result of the power operation is subtracted by one and then divided by the product of the skewness parameter and the coefficient of variation parameter to obtain the standardized deviation value, including:
[0139] S4.2.1: Using the skewness parameter in the target parameter triplet as the exponent, perform a power operation on the normalized measurement ratio to obtain the power transformation value.
[0140] S4.2.2: Subtract one from the power transformation value to obtain the power transformation offset.
[0141] S4.2.3: Multiply the skewness parameter in the target parameter triplet by the coefficient of variation parameter in the target parameter triplet to obtain the deviation scaling factor.
[0142] S4.2.4: Divide the power transform offset by the deviation scaling factor to obtain the standardized deviation value.
[0143] S4.2.5: When the absolute value of the deviation scale factor does not exceed the preset underflow threshold, the standardized deviation value is calculated by the logarithmic transformation formula, and the preset underflow threshold is set according to the floating-point representation precision of the operating environment.
[0144] The above five sub-steps are the step-by-step execution form of equation (4): S4.2.1 and S4.2.2 yield the numerator of equation (4). S4.2.3 yields the denominator S4.2.4 completes the division. S4.2.5 is an engineering reinforcement of the branch criterion: a strict check that the skewness parameter is not zero is insufficient to guarantee the safety of the denominator in floating-point operations, because although the skewness parameter is not zero, its product with the coefficient of variation parameter may still be small enough to cause the division result to lose a significant digit. By replacing the strict zero-equality check of the skewness parameter with a comparison of the absolute value of the deviation scale factor and a preset underflow threshold, the neighborhood of the actual logarithmic transformation formula covers all unsafe values, thus ensuring the numerical stability of the transformation result over the continuous skewness parameter value range generated by precise month-age interpolation. In one example, the preset underflow threshold is taken as one hundred times the floating-point machine precision of the operating environment.
[0145] Furthermore, separating the above five sub-steps into independent operations rather than combining them into a single expression also has its considerations at the implementation level. The power transformation offset, when the normalized measurement ratio is close to one, is the result of subtracting two nearly equal numbers, belonging to the cancellation-sensitive stage in floating-point arithmetic; explicitly extracting it as an intermediate quantity facilitates the use of an equivalent high-precision algorithm in implementations requiring higher precision, without needing to modify the remaining steps. Similarly, after the deviation scale factor is extracted separately, the threshold comparison in S4.2.5 can directly apply to this intermediate quantity without repeated calculation.
[0146] In one example, the operating environment uses double-precision floating-point representation, with a machine precision of approximately 2.22 x 10⁻¹⁶. Multiplying this by 100, the preset underflow threshold is approximately 2.22 x 10⁻¹⁴. If a precise month's age, after interpolation in S3, yields a skewness parameter of 3.0 x 10⁻¹⁵ and a coefficient of variation of 0.04, the deviation scaling factor is 1.2 x 10⁻¹⁶. Since its absolute value does not exceed the preset underflow threshold, this step uses a logarithmic transformation to calculate the standardized deviation value. In contrast, if this judgment is not made and S4.2.4 is executed directly, the numerator is also a very small quantity of the same order of magnitude. The significant digits of the division result will be overwhelmed by rounding errors, and the resulting standardized deviation value may show an order-of-magnitude deviation, thus severely distorting the percentile value output in S5.
[0147] Preferably, the value of the preset underflow threshold should match the floating-point representation precision of the operating environment: if the value is lower than the machine precision, the judgment is meaningless; if the value is several orders of magnitude higher than the machine precision, the branch will switch prematurely within the range where the skewness parameter can still participate in the calculation. Since equation (5) is a continuous extension of equation (4) when the skewness parameter approaches zero, even if the switch occurs prematurely in a slightly wider neighborhood, the difference between the results given by the two equations will approach zero as the neighborhood narrows. Therefore, the value of this threshold has a wide tolerance within the above range.
[0148] Example 7
[0149] Based on Example 1, S5 describes substituting the standardized deviation value into the polynomial approximation of the standard normal cumulative distribution to obtain the cumulative probability value, and performing a symmetrical mapping on the cumulative probability value according to the sign of the standardized deviation value to output the percentile value of the target object, including:
[0150] S5.1: Multiply the absolute value of the standardized deviation by the preset scaling coefficient, add the result of the multiplication to one, and take the reciprocal to obtain the intermediate variable.
[0151] That is, equation (6). Taking the reciprocal compresses the range of values of the intermediate variable to between 0 and 1. The larger the absolute value of the standardized deviation, the closer the intermediate variable is to 0, thus ensuring that the high-order terms in equation (7) decay rapidly, and that the polynomial weighting and convergence are achieved.
[0152] Specifically, when the absolute value of the standardized deviation is 0, the intermediate variable takes the value 1; when the value approaches infinity, the intermediate variable approaches 0, and the two constitute a monotonic mapping. This compression is the premise for equation (7) to hold: if the polynomial is constructed directly from the power of the standardized deviation without compression, the higher-order terms diverge when the absolute value of the standardized deviation is large, and the polynomial cannot approximate the entire axis uniformly; after compression by equation (6), the independent variable is restricted to a finite interval, and the fifth-order polynomial can achieve sufficient accuracy.
[0153] S5.2: Calculate the first to fifth powers of the intermediate variable, multiply the first to fifth powers of the intermediate variable by the corresponding coefficients of the first to fifth polynomials respectively, and sum them to obtain the polynomial weighted sum.
[0154] That is, equation (7). In actual calculation, the Qin Jiushao algorithm can be used to nest the terms from the highest degree downwards, transforming the evaluation of the fifth-degree polynomial into four-fold multiplication and four-fold addition, thus avoiding repeated multiplication caused by exponentiation of each term independently.
[0155] In another implementation, the first to fifth powers of the intermediate variable can be obtained recursively: first, the intermediate variable is multiplied by itself to obtain the second power; then, the second power is multiplied by the intermediate variable to obtain the third power, and so on up to the fifth power, requiring a total of four multiplications; subsequently, each of the five powers is multiplied by its corresponding coefficient and summed, requiring another five multiplications and four additions. This implementation has a similar computational complexity to Qin Jiushao's algorithm, but the five powers are explicitly retained as independent intermediate quantities, facilitating item-by-item verification during debugging or validation. It is preferred in implementations where traceability is required. It should be understood that the polynomial weighted sums given by the two implementations are mathematically identical, with only a negligible difference in the accumulation path of floating-point rounding.
[0156] S5.3: Calculate the exponential factor with the natural constant as the base and the negative half of the square of the standardized deviation as the exponent.
[0157] This factor is the probability density morphological term of the standard normal distribution, which, when multiplied by the polynomial weighted sum of equation (7), together constitutes an approximation of the area of the distribution tail.
[0158] Among them, the exponential factor decays rapidly as the absolute value of the standardized deviation increases. This decay rate matches the actual decay rate of the distribution tail area. Therefore, the structure of "one minus the product" in equation (8) can stably approach one when the absolute value of the standardized deviation is large, and will not exceed the range of probability values due to the approximation error.
[0159] S5.4: Multiply the preset normalization constant, the exponential factor, and the polynomial weighted sum by one, and subtract the result of the multiplication to obtain the cumulative probability value.
[0160] That is, equation (8). The preset normalization constant is the reciprocal of the square root of twice pi, which, together with the exponential factor, restores the normalization scale of the standard normal probability density.
[0161] Specifically, the preset normalization constant is approximately 0.3989423, which can be directly preset as a floating-point constant, eliminating the need to recalculate the square root of pi for each calculation. If the runtime environment provides a pi constant, the normalization constant can also be calculated once during system initialization and stored therein, avoiding repeated square root operations on high-frequency call paths.
[0162] S5.5: When the standardized deviation value is positive, multiply the cumulative probability value by one hundred to obtain the percentile value; when the standardized deviation value is not positive, multiply the difference between the value and the cumulative probability value by one hundred to obtain the percentile value.
[0163] That is, equation (9). Multiplying by one hundred converts the probability scale from 0 to 1 to a percentile scale from 0 to 100; in one implementation, the percentile value is rounded to two decimal places before output, and the precision matches the approximation error magnitude of equations (6) to (8).
[0164] It is worth noting that the choice of retaining two decimal places is not arbitrary. The absolute error of equations (6) to (8) on the full axis is on the order of 10 to the power of -7, which is on the order of 10 to the power of -5 after conversion to the percentile scale. Therefore, the third and subsequent decimal places have no practical distinguishing significance. On the other hand, two decimal places correspond to the resolution of one hundredth percentile on the percentile scale, which is sufficient to distinguish the numerical changes caused by measurements on adjacent days, which is consistent with the continuity pursued by this invention. In embodiments that are sensitive to storage space, only one decimal place may be retained, but in this case, two measurements separated by one or two days may be rounded to the same value, and the continuity is partially obscured at the presentation level.
[0165] It should be understood that the two branches of S5.5 give consistent results at the point where the standardized deviation is zero: at this point the cumulative probability is 0.5, and the two branches get 50.00 and 50.00 respectively. Therefore, the symmetric mapping will not introduce a jump at the zero point, and the output percentile values are continuous on the entire axis.
[0166] Example 8
[0167] like Figure 4 As shown, based on Example 1, the classification index parameter table described in S3, which uses age as the primary key and parameter triplets consisting of skewness parameter, median parameter, and coefficient of variation parameter as key values, is constructed from standard growth and development data in the following manner:
[0168] A1: Standard growth and development data are divided into multiple parameter sub-tables according to the combination of measurement type and gender identifier. Each parameter sub-table is identified by a composite index key formed by concatenating the value of the measurement type and the value of the gender identifier.
[0169] A2: In each of the parameter sub-tables, the discrete age values given by the standard growth and development data are used as age points, and arranged in ascending order of values to form an ordered age key sequence.
[0170] A3: The skewness parameter, median parameter, and coefficient of variation parameter corresponding to each age point are encapsulated into parameter triples in a fixed order and stored with the age point as the primary key.
[0171] A4: Organize the composite index keys of each parameter sub-table into a hash index to support direct location of the parameter sub-table by combination of the measurement type and the gender identifier.
[0172] A5: The first and last age points of the ordered age key sequence of each parameter sub-table are recorded as the endpoints of the effective age interval of the parameter sub-table.
[0173] A6: When the precise age does not fall within the range defined by the endpoints of the effective age interval, the parameter triplet corresponding to the age point that is closest to the precise age in the effective age interval is taken as the target parameter triplet.
[0174] The structure consists of three layers: the outermost layer is a hash mapping from the composite index key to the parameter partition table; the middle layer is a primary key mapping from the age points within the parameter partition table to the parameter triplet; and the innermost layer is a triplet composed of three parameters in a fixed order. The significance of encapsulating in a fixed order is that values do not need to be resolved by name and can be directly expanded into three variables by position. The division of labor between the hash index and the ordered age key sequence allows each level of positioning to leverage its strengths—measurement type and gender identifier are discrete and have a limited number of values, suitable for direct hash positioning, while age points require numerical comparison for delimitation, suitable for ordered sequences. A5 and A6 handle the case where the precise age exceeds the coverage of standard data. In this case, there are no two endpoints available for interpolation; the parameter triplet with the shortest effective age interval endpoint is used, allowing the calculation to be completed outside the boundary and maintaining the continuous extension of the result.
[0175] In an embodiment of the present invention, a specific form of the above three-layer structure can be illustrated as follows. Assuming that standard growth and development data covers two measurement types and two gender identifiers, A1 obtains four parameter sub-tables, whose composite index keys correspond to four combinations: the first measurement type identifier and the first gender identifier, the first measurement type identifier and the second gender identifier, the second measurement type identifier and the first gender identifier, and the second measurement type identifier and the second gender identifier. Taking the parameter sub-table corresponding to the first measurement type identifier and the first gender identifier as an example, its stored content at several initial age points is as follows: primary key 0 corresponds to the parameter triplet (1, 49.8842, 0.03795), primary key 1 corresponds to the parameter triplet (1, 54.7244, 0.03557), and primary key 2 corresponds to the parameter triplet (1, 58.4249, 0.03424); the three positions within the triplet are fixed as the skewness parameter, the median parameter, and the coefficient of variation parameter, respectively (the above are all exemplary values and are not intended to limit the present invention).
[0176] In contrast, the parameter tables corresponding to the second measurement type label and the first gender label, stored under the same primary key, contain the following: primary key 0 corresponds to the parameter triplet (1, 3.3464, 0.14602), primary key 1 corresponds to the parameter triplet (1, 4.4709, 0.13395), and primary key 2 corresponds to the parameter triplet (1, 5.5675, 0.12385). Comparing these two sets of values side-by-side reveals that the median parameters for the two measurement types under the same primary key belong to different dimensions, and the magnitudes of the coefficients of variation differ by approximately 3.8 times. If these parameters are not stored in the A1 table but are mixed in the same table, the primary key will no longer uniquely identify a parameter triplet, and the delimitation search in S3.3 will not return a definite result. This is precisely why the table partitioning structure is indispensable.
[0177] Specifically, the loading of each parameter table can be scheduled during the system initialization phase: all standard growth and development data are read in at once when the computing device is instantiated, and the table is partitioned according to A1 to A5, sorted by month point, encapsulated as triples, organized with hash indexes, and the endpoints of the effective month intervals are marked. The results are then stored in memory. Subsequent calculation requests only perform retrieval and interpolation, without repeating the above construction process. Since the content of the parameter tables remains unchanged during system operation, this storage strategy does not introduce consistency issues, but reduces the construction overhead from once per request to once throughout the entire lifecycle.
[0178] Furthermore, the calibration and use of the endpoints of the effective age interval can be illustrated as follows. Suppose that the ordered age key sequence of a certain parameter table starts from 0 and ends at 60, then the endpoints of its effective age interval are the first age point 0 and the last age point 60. If the calculated precise age is 61.5, which does not fall within this interval, then the endpoint with the shortest distance to 61.5, i.e., the last age point 60, is taken by A6, and the parameter triplet corresponding to age point 60 is directly used as the target parameter triplet. If the precise age is negative or less than the first age point, then similarly, the parameter triplet corresponding to the first age point 0 is taken. It should be noted that the output in the case of exceeding the limit should be understood as the extrapolation result based on the nearest endpoint standard. There is an age mismatch between its reference standard and the precise age, and the degree of mismatch increases with the increase of the exceedance range.
[0179] Preferably, the extrapolation processing of A6 can be combined with the result record: in the case of out-of-bounds errors, an out-of-bounds flag is added to the structured calculation result record to distinguish between normal interpolation results and extrapolation results during subsequent reading. The out-of-bounds flag does not participate in any calculation, but only exists as a record attribute, and therefore does not change the calculation path of the present invention.
[0180] Example 9
[0181] Based on Example 1, the method further includes:
[0182] Step A: Encapsulate the precise age in months, the target parameter triplet, the standardized deviation value, and the percentile value into a structured calculation result record.
[0183] Encapsulate intermediate values instead of just outputting percentile values, so that the entire calculation process can be traced and verified.
[0184] Specifically, the structured calculation result record contains four fields: the first field stores the precise age in months, which is a floating-point number with decimals; the second field stores the target parameter triplet, which is three floating-point numbers arranged in a fixed order; the third field stores the standardized deviation value, which is a floating-point number; and the fourth field stores the percentile value, which is a floating-point number with two decimal places. These four fields correspond exactly to the outputs of the four stages S2 to S5, so the calculation process can be traced back step by step from this record: the age calculation can be checked from the first field, the interpolation result can be checked from the second field, the standardized conversion can be checked from the third field, and the final conversion can be checked from the fourth field.
[0185] It should be noted that retaining intermediate values is of particular significance to the scheme described in this invention. Since the target parameter triplet is the result of interpolation and not the original value in the standard data, if only percentile values are stored, it will be impossible to verify the reference standard used in the calculation afterward. However, the existence of the second field ensures that the reference standard used in each calculation is fixed in the record, so that even if the standard growth and development data is updated in the future, the historical record can still be reproduced according to the parameter triplet it contains.
[0186] Step B: Record the structured calculation results and associate them with the object identifier of the target object in the growth and development assessment record table.
[0187] In this embodiment of the invention, the growth and development assessment record form uses a combination of object identifier and measurement date as the basis for record location. Each record, in addition to the four fields containing the structured calculation result record, also stores the input items for that calculation, namely the measurement type, the gender identifier, and the measurement value. The object identifier is a serial number or code generated internally by the physical examination data processing system, which does not contain personal identification information. In one example, it is in the form of "OBJ-0001" and is only used to associate multiple measurement records of the same target object.
[0188] The growth and development assessment record form can be indexed by object identifier to support batch reading by object identifier in step C; or it can be indexed by combination of object identifier and measurement type to allow height and weight records to be read in sequence without further filtering after reading.
[0189] Step C: When multiple calculation requests for the same object identifier are received, read multiple structured calculation result records in the growth and development assessment record table in ascending order of measurement date, extract percentile values from each structured calculation result record, and generate a time series sequence of percentile values for the target object.
[0190] Since the percentile value output by this invention is a continuous function of the precise age in months, the time series composed of records obtained from multiple measurements no longer contains the step component introduced by the switching of age levels. Therefore, the changes that occur in the series can be directly attributed to the changes in the measured values themselves, and the usability of the series is thus guaranteed.
[0191] In one example, a target object identified as "OBJ-0001" had its height measured on three different dates. The percentile values calculated by this invention were 43.19, 41.39, and 40.88, showing a gradual change. However, if the same set of data were processed using existing whole-month age-based methods, the three results would be 43.98, 40.12, and 40.12, respectively. A significant portion of the difference between the first and second measurements is due to age-based shifts rather than actual growth differences, while the difference between the second and third measurements is completely unchanged because they fall within the same age-based range. The comparison clearly shows that the percentile value time series generated by this invention is superior to existing methods in both time resolution and change attribution. The above values are exemplary values calculated using the parameters in Example 1 and do not constitute a limitation of this invention.
[0192] Example 10
[0193] like Figure 5 As shown, this embodiment provides a device for calculating percentile values of children's growth and development data, including:
[0194] The measurement data acquisition module is used to acquire the target object's date of birth, measurement date, gender identifier, measurement type, and measurement value. The measurement value is the growth and development index detection value of the target object under the measurement type, where the measurement type is height or weight, and the measurement value is the actual measured value corresponding to the measurement type.
[0195] The precise age calculation module is used to decompose the date difference between the birth date and the measurement date to obtain the year component, month component and day component, and sum them up by month to obtain the precise age in months with decimals;
[0196] The parameter interpolation module is used to linearly interpolate the parameter triplets corresponding to the two adjacent age points according to the measurement type and the gender identifier, based on the classification index parameter table with age point as the primary key and parameter triplet as the key value consisting of skewness parameter, median parameter and coefficient of variation parameter. The target parameter triplet is obtained by parameter-by-parameter linear interpolation according to the position ratio of the precise age point relative to the two adjacent age points. The skewness parameter, the median parameter and the coefficient of variation parameter respectively characterize the skewness, position center and dispersion of the standard distribution at the age point.
[0197] The deviation value conversion module is used to select either a power transform or a logarithmic transform based on whether the skewness parameter in the target parameter triplet is zero, and convert the measured value into a standardized deviation value. The standardized deviation value is a dimensionless quantity that measures the deviation of the measured value from the distribution center by a factor of the dispersion of the standard distribution after skew correction.
[0198] The percentile value output module is used to substitute the standardized deviation value into the polynomial approximation of the standard normal cumulative distribution to obtain the cumulative probability value, and to perform a symmetrical mapping on the cumulative probability value according to the sign of the standardized deviation value to output the percentile value of the target object.
[0199] The above modules can be implemented by software modules deployed on the server side, or by a processor executing a computer program stored in memory. The overall flowchart of the percentile numerical calculation method for children's growth and development data provided in this embodiment of the invention is as follows: Figure 6 As shown.
[0200] Specifically, the data transfer relationship between the five modules is as follows. The measurement data acquisition module is located at the data entry point. The five data items it acquires are output in two ways: the birth date and the measurement date are sent to the precise age calculation module, and the measurement type and gender identifier are sent to the parameter interpolation module. The measurement value is sent directly to the deviation value conversion module, bypassing both the precise age calculation module and the parameter interpolation module. The output of the precise age calculation module, namely the precise age in months with decimals, is sent to the parameter interpolation module as the third input. The parameter interpolation module takes the measurement type, the gender identifier, and the precise age in months with decimals as input and outputs the target parameter triplet to the deviation value conversion module. The deviation value conversion module takes the measurement value and the target parameter triplet as input and outputs the standardized deviation value to the percentile value output module, which outputs the percentile value of the target object.
[0201] It should be noted that there is a direct cross-module path in the above data transmission relationship, meaning that the measured value goes directly from the measurement data acquisition module to the deviation value conversion module without passing through the two intermediate modules. This arrangement stems from the calculation logic of this invention itself: the precise age calculation module and the parameter interpolation module jointly complete the determination of the reference standard, a process unrelated to the measured value; the measured value only participates in the calculation after the reference standard is determined. The advantage of separating the two paths is that the process of determining the reference standard can be completed in advance before the measured value is entered. For example, during the form filling stage of the physical examination data processing system, interpolation can be completed based on the known date of birth, measurement date, gender identifier, and measurement type. After the measured value is entered, only the calculation of the deviation value conversion module and the percentile value output module needs to be performed to give the result.
[0202] Furthermore, the parameter interpolation module may include a storage unit for carrying the classification index parameter table. This storage unit is constructed once during the device instantiation phase as described in Embodiment 8 and resides throughout the device's lifecycle, allowing it to be shared by all calls to the parameter interpolation module. The deviation value conversion module and the percentile value output module do not hold cross-call states; their required preset scaling coefficients, first to fifth polynomial coefficients, preset normalization constants, and preset underflow thresholds are all constants and can be preset as static configuration items for the modules.
[0203] In this embodiment of the invention, the device can be implemented as an independent component in a physical examination data processing system, providing an interface that takes birth date, measurement date, gender identifier, measurement type, and measurement value as input parameters and returns percentile values; or it can be implemented as an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the steps of the methods described in the foregoing embodiments. The steps of the methods described in the foregoing embodiments can also be stored in the form of a computer-readable storage medium, including read-only memory, random access memory, magnetic disks, or optical disks, etc., which are media capable of storing program code.
[0204] It should be understood that the above module division is only an exemplary functional division method, and it can be merged or further split according to deployment needs during implementation. For example, the precise age calculation module and the parameter interpolation module can be merged into a reference standard determination module, and the deviation value conversion module and the percentile value output module can be merged into a conversion module; conversely, the parameter interpolation module can also be split into a table positioning unit, a boundary retrieval unit, and a parameter-by-parameter interpolation unit as described in Embodiment 4. The above modifications do not change the data transmission relationship and calculation logic between each step, and therefore all fall within the protection scope of this invention.
[0205] The above description is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the protection scope of the present invention.
Claims
1. A method for calculating percentile values in children's growth and development data, characterized in that, include: The target object's date of birth, date of measurement, gender identifier, measurement type, and measurement value are obtained. The measurement value is the growth and development index detection value of the target object under the measurement type, which is height or weight. The measurement value is the actual measured value corresponding to the measurement type. The date of birth and the date of measurement are decomposed into date difference components to obtain year, month and day components. The sum of these components is then calculated by month to obtain the precise age in months with a decimal. Based on the measurement type and the gender identifier, from the classification index parameter table with age point as the primary key and parameter triples consisting of skewness parameter, median parameter and coefficient of variation parameter as key values, the parameter triples corresponding to the two adjacent age points are linearly interpolated parameter by parameter according to the position ratio of the precise age relative to the two adjacent age points to obtain the target parameter triples. The skewness parameter, the median parameter and the coefficient of variation parameter respectively characterize the skewness, position center and dispersion of the standard distribution at the age point; Depending on whether the skewness parameter in the target parameter triplet is zero, a power transform or logarithmic transform is selected to convert the measured value into a standardized deviation value. The standardized deviation value is a dimensionless quantity that measures the deviation of the measured value from the distribution center by a factor of the standard distribution after skew correction, in units of the degree of dispersion of the standard distribution. The standardized deviation value is substituted into the polynomial approximation of the standard normal cumulative distribution to obtain the cumulative probability value. The cumulative probability value is then symmetrically mapped according to the sign of the standardized deviation value to output the percentile value of the target object.
2. The method according to claim 1, characterized in that, The process of decomposing the date of birth and the date of measurement into year, month, and day components, and then summing them by month to obtain the precise age in months with a decimal, includes: The date difference is calculated starting from the birth date and ending at the measurement date. The date difference is then decomposed into whole years, whole months, and remaining days according to the calendar carry-over rule. The whole years, whole months, and remaining days are respectively recorded as the year component, the month component, and the day component. The annual component, the monthly component, and the daily component are converted to monthly values to obtain the number of months converted from the year, the number of months converted from a whole month, and the number of months converted from the day. The exact month age with a decimal is obtained by summing the year converted to months, the whole month converted to months, and the day converted to months.
3. The method according to claim 2, characterized in that, The step of converting the annual component, the monthly component, and the daily component to monthly values to obtain the number of months converted from the year, the number of months converted from a whole month, and the number of months converted from the day includes: Multiply the annual amount by the number of months in each year to obtain the converted number of months in the year; The monthly component is directly counted as the number of months converted from the whole month; Divide the daily component by the preset average number of days in a month to obtain the daily converted month number, which is a decimal. The preset average number of days per month is thirty, or it is the ratio of the actual number of days in a calendar year to the number of months in a year; When the remaining number of days is zero, the day-to-month conversion is set to zero, thus converting the precise month age with decimals into an integer value.
4. The method according to claim 1, characterized in that, Based on the measurement type and the gender identifier, from the classification index parameter table with age as the primary key and parameter triples consisting of skewness, median, and coefficient of variation as key values, the parameter triples corresponding to the two adjacent age points are linearly interpolated parameter by parameter according to the position ratio of the precise age relative to the two adjacent age points to obtain the target parameter triples, including: A composite index key is generated based on the measurement type and the gender identifier, and the parameter sub-table identified by the composite index key is located in the classification index parameter table; Arrange all age points in the parameter table in ascending order of their values to obtain an ordered age key sequence; In the ordered age key sequence, the previous age point adjacent to the precise age is retrieved as the lower bound age point, and the next age point adjacent to the precise age is retrieved as the upper bound age point. When the lower bound age point is equal to the upper bound age point, the parameter triplet corresponding to the lower bound age point is directly used as the target parameter triplet. When the lower bound age point is not equal to the upper bound age point, the difference between the precise age and the lower bound age point is divided by the difference between the upper bound age point and the lower bound age point to obtain the position ratio. According to the aforementioned positional proportions, linear interpolation is performed on the skewness parameter, median parameter, and coefficient of variation parameter in the parameter triplet corresponding to the lower bound age point and the parameter triplet corresponding to the upper bound age point, respectively, to obtain the target parameter triplet.
5. The method according to claim 1, characterized in that, The step of converting the measured value into a standardized deviation value by selecting either a power transform or a logarithmic transform based on whether the skewness parameter in the target parameter triplet is zero includes: Calculate the ratio of the measured value to the median parameter in the target parameter triplet to obtain the normalized measurement ratio; When the skewness parameter in the target parameter triplet is not zero, the power transformation formula is selected, and the normalized measurement ratio is exponentially operated on with the skewness parameter as the exponent. The result of the power operation is reduced by one and then divided by the product of the skewness parameter and the coefficient of variation parameter to obtain the standardized deviation value. When the skewness parameter in the target parameter triplet is zero, the logarithmic transformation formula is selected, and the natural logarithm of the normalized measurement ratio is divided by the coefficient of variation parameter in the target parameter triplet to obtain the standardized deviation value.
6. The method according to claim 5, characterized in that, When the skewness parameter in the target parameter triplet is not zero, the power transformation formula is selected, and the normalized measurement ratio is raised to the power of the skewness parameter. The result of the power operation is subtracted by one and then divided by the product of the skewness parameter and the coefficient of variation parameter to obtain the standardized deviation value, including: Using the skewness parameter in the target parameter triplet as the exponent, the normalized measurement ratio is exponentially exponentially operated to obtain the power transformation value; Subtract one from the power transform value to obtain the power transform offset; Multiply the skewness parameter in the target parameter triplet by the coefficient of variation parameter in the target parameter triplet to obtain the deviation scaling factor; Divide the power transform offset by the deviation scaling factor to obtain the standardized deviation value; When the absolute value of the deviation scale factor does not exceed a preset underflow threshold, the standardized deviation value is calculated by the logarithmic transformation formula, and the preset underflow threshold is set according to the floating-point representation precision of the operating environment.
7. The method according to claim 1, characterized in that, The process of substituting the standardized deviation value into the polynomial approximation of the standard normal cumulative distribution to obtain the cumulative probability value, and then performing a symmetrical mapping on the cumulative probability value according to the sign of the standardized deviation value to output the percentile value of the target object includes: Multiply the absolute value of the standardized deviation by a preset scaling coefficient, add the result to one, and take the reciprocal to obtain the intermediate variable; Calculate the first to fifth powers of the intermediate variable, multiply the first to fifth powers of the intermediate variable by the corresponding coefficients of the first to fifth predefined polynomials, and sum them to obtain the polynomial weighted sum; Calculate the exponential factor with the natural constant as the base and the negative half of the square of the standardized deviation as the exponent; The cumulative probability value is obtained by multiplying the preset normalization constant, the exponential factor, and the polynomial weighted sum, and then subtracting the result of the multiplication from one. When the standardized deviation is positive, the cumulative probability value is multiplied by 100 to obtain the percentile value; when the standardized deviation is not positive, the difference between the value and the cumulative probability value is multiplied by 100 to obtain the percentile value.
8. The method according to claim 1, characterized in that, The classification index parameter table, with age as the primary key and parameter triplets consisting of skewness, median, and coefficient of variation as key values, is constructed from standard growth and development data in the following manner: Standard growth and development data are divided into multiple parameter sub-tables according to the combination of measurement type and gender identifier. Each parameter sub-table is identified by a composite index key formed by concatenating the value of the measurement type and the value of the gender identifier. In each of the parameter sub-tables, the discrete age values given by the standard growth and development data are used as age points, and they are arranged in ascending order of value to form an ordered age key sequence. The skewness parameter, median parameter, and coefficient of variation parameter corresponding to each age point are encapsulated into parameter triples in a fixed order and stored with the age point as the primary key. The composite index keys of each parameter sub-table are organized into a hash index to support direct location of the parameter sub-table by the combination of the measurement type and the gender identifier; The first and last month's age points of the ordered month's age key sequence of each parameter sub-table are recorded as the endpoints of the effective month's age interval of the parameter sub-table. When the precise age does not fall within the range defined by the endpoints of the effective age interval, the parameter triplet corresponding to the age point with the shortest distance from the precise age among the endpoints of the effective age interval is taken as the target parameter triplet.
9. The method according to claim 1, characterized in that, The method further includes: The precise age in months, the target parameter triplet, the standardized deviation value, and the percentile value are encapsulated into a structured calculation result record; The structured calculation results are recorded and associated with the object identifier of the target object, and stored in the growth and development assessment record table; When multiple calculation requests for the same object identifier are received, multiple structured calculation result records in the growth and development assessment record table are read in ascending order of measurement date, and percentile values in each structured calculation result record are extracted to generate a time series sequence of percentile values for the target object.
10. A device for calculating percentile values of children's growth and development data, characterized in that, include: The measurement data acquisition module is used to acquire the target object's date of birth, measurement date, gender identifier, measurement type, and measurement value. The measurement value is the growth and development index detection value of the target object under the measurement type, where the measurement type is height or weight, and the measurement value is the actual measured value corresponding to the measurement type. The precise age calculation module is used to decompose the date difference between the birth date and the measurement date to obtain the year component, month component and day component, and sum them up by month to obtain the precise age in months with decimals; The parameter interpolation module is used to linearly interpolate the parameter triplets corresponding to the two adjacent age points according to the measurement type and the gender identifier, based on the classification index parameter table with age point as the primary key and parameter triplet as the key value consisting of skewness parameter, median parameter and coefficient of variation parameter. The target parameter triplet is obtained by parameter-by-parameter linear interpolation according to the position ratio of the precise age point relative to the two adjacent age points. The skewness parameter, the median parameter and the coefficient of variation parameter respectively characterize the skewness, position center and dispersion of the standard distribution at the age point. The deviation conversion module is used to select either a power transform or a logarithmic transform based on whether the skewness parameter in the target parameter triplet is zero, and convert the measured value into a standardized deviation value. The standardized deviation value is a dimensionless quantity that measures the deviation of the measured value from the distribution center by a factor of the dispersion of the standard distribution after skew correction. The percentile value output module is used to substitute the standardized deviation value into the polynomial approximation of the standard normal cumulative distribution to obtain the cumulative probability value, and to perform a symmetrical mapping on the cumulative probability value according to the sign of the standardized deviation value to output the percentile value of the target object.