A method and system for measuring average values ​​over a long period of time with zero memory

By acquiring signal values ​​in real time and dynamically updating the average value using an iterative algorithm, combined with overflow handling of measurement counts and outlier removal, the problem of linear growth in memory usage with measurement duration in traditional methods is solved, achieving efficient average value calculation without memory requirements in resource-constrained devices.

CN120631798BActive Publication Date: 2026-04-03HANGZHOU GUOLEI SEMICON EQUIP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In resource-constrained embedded systems or low-power terminals, traditional averaging methods require storing all historical data, resulting in memory usage increasing linearly with measurement duration, making it impossible to effectively calculate the average value of signals over long periods of time.

Method used

A method for measuring the average value over a long period of time with zero memory is adopted. By acquiring signal values ​​in real time and dynamically updating the average value using an iterative algorithm, combined with overflow handling of measurement counts and outlier removal, the method avoids storing historical data and dynamically configures the outlier removal range, thus achieving average value calculation without memory.

Benefits of technology

It enables real-time calculation of average values ​​in resource-constrained devices without saving sampling points, reducing memory usage, improving the speed and efficiency of measurement signals, and avoiding errors caused by numerical overflow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120631798B_ABST
    Figure CN120631798B_ABST
Patent Text Reader

Abstract

This invention relates to a method and system for long-term, zero-memory average measurement, belonging to the field of data processing technology. The method includes: real-time acquisition of measurement signal values; dynamic updating of the average value based on the measurement values ​​and an iterative algorithm; determining the current measurement count and whether it exceeds the processor's numerical limit; and, if it does, performing overflow handling for the measurement length. This method eliminates the need to store all sampling points, requires no memory, calculates the average value simultaneously with sampling, reduces costs, and improves the speed and efficiency of signal measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data processing technology, and in particular relates to a method and system for measuring the average value over a long period of time with zero memory. Background Technology

[0002] In real-time measurement scenarios, calculating the average value of signals over long periods is crucial for achieving device status monitoring, data filtering, and trend analysis. Traditional averaging methods require storing all historical data and averaging it, resulting in a linear increase in memory usage with measurement duration. This poses a significant challenge in resource-constrained embedded systems or low-power terminals. Therefore, finding a better way to achieve measurement averaging has become an urgent problem to solve. Summary of the Invention

[0003] In view of the shortcomings of the prior art, the purpose of the invention is to provide a measurement method and system for measuring the average value over a long period of time with zero memory. This method does not require saving all sampling points, does not require memory, calculates the average value in real time during sampling, reduces costs, and improves the speed and efficiency of the measurement signal.

[0004] In a first aspect, the present invention provides a method for measuring the average value over a long period of time with zero memory, comprising: S1, acquiring the measured value of the measurement signal in real time; S2, dynamically updating the average value of the measurement based on the measured value and an iterative algorithm; S3, determining the current number of measurements and judging whether the current number of measurements exceeds the upper limit of the processor value, and performing overflow processing of the measurement length if it is determined that the current number of measurements exceeds the upper limit of the processor value.

[0005] Furthermore, dynamically updating the average value of the measurements based on the measured values ​​and the iterative algorithm includes: Where M(n) represents the average value, M(n-1) represents the average value of the (n-1)th measurement, a(n) represents the measured value, n represents the current measurement number, and n≥1.

[0006] Further, if it is determined that the current number of measurements exceeds the processor's numerical limit, overflow processing of the measurement length is performed, including: if it is determined that the current number of measurements exceeds the processor's numerical limit, decomposing the current number of measurements n into n = k·N + i, where k represents the cumulative overflow count, i represents the remainder in the current period, 0 < i ≤ N, and N represents the processor's numerical limit; according to Calculate the increment term, where δ = a(n) - M(n-1).

[0007] Furthermore, the method further includes: determining an outlier rejection range, the outlier rejection range including a first preset value and a second preset value; determining whether the measured value is within the outlier rejection range; and discarding the measured value if it is determined that the measured value is not within the outlier rejection range.

[0008] Furthermore, the first preset value and the second preset value are dynamically configured based on the application scenario.

[0009] A second aspect of the present invention provides a measurement system for measuring the average value over a long period of time with zero memory. The system includes: an acquisition module for acquiring the measured value of the measurement signal in real time; an update module for dynamically updating the average value of the measurement based on the measured value and an iterative algorithm; and a processing module for determining the current number of measurements and judging whether the current number of measurements exceeds the upper limit of the processor value. If it is determined that the current number of measurements exceeds the upper limit of the processor value, overflow processing of the measurement length is performed.

[0010] A third aspect of the present invention provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described in any one aspect of the present invention.

[0011] A fourth aspect of the present invention provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method described in any one of the first aspects of the present invention.

[0012] The beneficial effects of this invention are as follows:

[0013] The present invention discloses a method and system for measuring average values ​​over a long period of time with zero memory. This method acquires measurement values ​​of the measurement signal in real time; dynamically updates the average value based on the measurement values ​​and an iterative algorithm; determines the current measurement count and checks if it exceeds the processor's maximum value. If the current measurement count exceeds the processor's maximum value, overflow handling for the measurement length is performed. This method eliminates the need to store all sampling points, requires no memory, and calculates the average value simultaneously with sampling, reducing costs and improving the speed and efficiency of signal measurement. Attached Figure Description

[0014] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. It is obvious that the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings.

[0015] Figure 1 This is a flowchart of a method for measuring the average value over a long period of time with zero memory, according to an embodiment of the present invention.

[0016] Figure 2 This is a schematic diagram of a measurement system for measuring average values ​​over a long period of time with zero memory, according to an embodiment of the present invention;

[0017] Figure 3 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0018] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0019] Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts disclosed in this invention.

[0020] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The terms "installed," "connected," and "linked" should be interpreted broadly; for example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0021] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of methods and systems consistent with some aspects of the invention as detailed in the appended claims.

[0022] This invention proposes a method, system, and related equipment for measuring the average value over a long period of time with zero memory. Specifically, the method, system, and related equipment for measuring the average value over a long period of time with zero memory according to embodiments of this invention are described below with reference to the accompanying drawings.

[0023] In real-time measurement scenarios, calculating the average value of signals over long periods is crucial for device status monitoring, data filtering, and trend analysis. Traditional averaging methods require storing all historical data and averaging through accumulation, leading to a linear increase in memory usage with measurement duration. This poses a significant challenge in resource-constrained embedded systems or low-power terminals. To address this memory bottleneck, recursive averaging algorithms (such as moving averages and exponentially weighted averages) dynamically update the mean using iterative formulas, retaining only the current statistical value and significantly reducing memory consumption. However, these methods are prone to overflow risks during long-term operation when the cumulative number of measurements exceeds the processor's numerical representation range (e.g., the upper limit of a 32-bit integer), causing count rollback or distorted mean calculations. Existing technologies often avoid overflow by periodically resetting the measurement cycle or limiting the sampling duration, but this interrupts continuity and sacrifices long-term statistical characteristics.

[0024] to this end, Figure 1 This is a flowchart of a method for measuring the average value over a long period of time with zero memory, according to an embodiment of the present invention. It should be noted that the method for measuring the average value over a long period of time with zero memory, according to the embodiments of the present invention, can be applied to the measurement system for measuring the average value over a long period of time with zero memory, according to the embodiments of the present invention. This measurement system for measuring the average value over a long period of time with zero memory can be configured on an electronic device or in a server. This application does not limit the scope of this method.

[0025] like Figure 1 As shown, a method for measuring the average value over a long period of time with zero memory is described, the method comprising:

[0026] In embodiments of the present invention, the method for measuring the average value over a long period of time with zero memory can be used in electronic systems that require real-time calculation of data average values ​​and have limited device resources. Such electronic systems include, but are not limited to, electronic systems equipped with semiconductor testing equipment and Internet of Things sensors.

[0027] S110 is used to acquire the measured values ​​of measurement signals in real time.

[0028] In embodiments of the present invention, the measurement values ​​of the measurement signals can be acquired based on semiconductor devices or Internet of Things sensors.

[0029] The measured signals include, but are not limited to, electrical quantities, air temperature, humidity, etc. This invention does not impose any limitations on these parameters.

[0030] S120 dynamically updates the average value of the measurements based on the measured values ​​and the iterative algorithm.

[0031] In an embodiment of the present invention, the iterative algorithm for the average period of the measurement signal is calculated once for each measurement.

[0032] In embodiments of the present invention, it can be based on To update the average value of the measurement, M(n) represents the average value, M(n-1) represents the average value of the (n-1)th measurement, a(n) represents the measured value, n represents the current measurement number, and n≥1.

[0033] For example, the series of measured values ​​are: 5.434, 5.410, 5.478, and 5.213.

[0034] That is, M(0) = 0;

[0035] M(1)=M(0)+(5.434-M(0)) / 1=5.434;

[0036] M(2)=M(1)+(5.410-M(1)) / 2=5.434+(5.434-5.410) / 2=5.446;

[0037] M(3)=M(2)+(5.478-M(2)) / 3=5.446+(5.478-5.446) / 3=5.457;

[0038] M(4)=M(3)+(5.213-M(3)) / 4=5.457+(5.213-5.457) / 4=5.396;

[0039] The formula derivation is as follows:

[0040]

[0041]

[0042] S130, determine the current number of measurements and whether the current number of measurements exceeds the processor's numerical limit. If the current number of measurements exceeds the processor's numerical limit, perform overflow processing for the measurement length.

[0043] In an embodiment of the present invention, the current measurement count is determined. If the current measurement count exceeds the processor's numerical limit, the current measurement count n is decomposed into n = k·N + i, where k represents the cumulative overflow count, i represents the remainder in the current period, 0 < i ≤ N, and N represents the processor's numerical limit. According to... Calculate the increment term, where δ = a(n) - M(n-1).

[0044] In other words, the iterative algorithm based on the average period of the measurement signal encounters a problem in practice: as the number of iterations increases, the number of measurements (i.e., the denominator n) exceeds the maximum numerical range that the processor can represent when calculating the average value, leading to the inability to correctly store or calculate the value of n. Therefore, the problem is solved by decomposing the number of measurements n = k·N + i, where: N represents the upper limit of the processor's numerical value (to avoid directly using n exceeding N), k represents the cumulative overflow count (i.e., the number of periods in which N measurements have been completed), and i represents the remainder in the current period (0 < i ≤ N). The incremental term is calculated by redesigning the average update logic based on the formula for calculating the incremental term, decomposing the long-term accumulated average into multiple periods for processing. For example, within each period, only the remainder i is used as the measurement count for the current period, and the calculation method of the denominator is adjusted in conjunction with the accumulated overflow count k to avoid directly using an excessively large value of n. This allows the long-term accumulated measurement count and sum to be decomposed into multiple controllable intervals through periodic (or block) methods, thereby enabling long-term overflow-free average calculation in resource-constrained devices.

[0045] For example, The formula is derived as follows, starting from the right side of the equation:

[0046] Numerator=δ / N·δ / i=(δ·δ) / (N·i)

[0047] Denominator=δ / N+k·δ / i=δ·(1 / N+k / i)=δ·(i+k·N) / (N·i)

[0048] Numerator / denominator=[(δ·δ) / (N·i)] / [δ·(i+k·N) / (N·i)]

[0049] =[(δ·δ) / (N·i)]·[(N·i) / δ·(i+k·N)]

[0050] =δ / (k·N+i), that is

[0051] In an embodiment of the present invention, an outlier rejection range is determined, which includes a first preset value and a second preset value; it is determined whether the measured value is within the outlier rejection range; if it is determined that the measured value is not within the outlier rejection range, the measured value is discarded.

[0052] The first and second preset values ​​are dynamically configured based on the application scenario.

[0053] In other words, in actual measurements, the measured value of the signal often has a range, but it is often affected by environmental interference. For example, the period of the measured signal may be severely distorted due to strong external electromagnetic interference. This invention provides a reasonable threshold range with a minimum threshold (i.e., a first preset value) and a maximum threshold (i.e., a second preset value). Measured values ​​exceeding this range are discarded and not calculated. For example, when measuring outdoor weather temperature, common sense dictates that the temperature cannot be lower than -100 degrees Celsius or higher than +100 degrees Celsius. Therefore, if it exceeds this range, it must be an abnormal interference value and should be discarded. This invention provides such a mechanism, but the specific value of the threshold needs to be adjusted and set by the user according to their actual scenario.

[0054] In embodiments of the present invention, the following are employed: Only the current average value M(n) and the number of measurements n need to be stored, eliminating the need to save historical data and significantly reducing memory usage. An overflow handling mechanism, where the current number of measurements n is decomposed into n = k·N + i, solves the overflow problem when the number of measurements exceeds the processor's numerical limit, ensuring stable calculation during long-term operation and avoiding errors or crashes caused by numerical overflow. By dynamically configuring the outlier removal range (first and second preset values), measurements exceeding a reasonable range are automatically filtered, improving the accuracy and robustness of the average value. The outlier range can be adjusted according to the application scenario, enhancing the method's adaptability. Supporting dynamic configuration of outlier removal parameters and overflow handling logic, it can adapt to different scenario requirements (such as high-noise environments or high-precision measurements), demonstrating strong scalability.

[0055] In embodiments of this invention, testing often requires measuring every electrical quantity. Typically, a single electrical quantity is sampled dozens or even hundreds of thousands of times before averaging. A common practice is to store all sampled values ​​in memory, summing them up and dividing by the number of samples to obtain the average. This approach presents two problems: 1. Results cannot be obtained immediately; 2. It requires a large amount of memory, such as several megabytes. In semiconductor chip testing, it is often necessary to test the signal period / frequency or duty cycle. Considering the inherent jitter of the signal period (i.e., the signal period changes over time), it is necessary to measure the average value of the period. A common practice is to store the measurement value of each signal period in memory, for example, sampling 5000 points, summing the period values ​​of the 5000 points, and then dividing by 5000 to obtain the final measurement result. This invention proposes an algorithm that does not require storing all sampled points, eliminates the need for memory, and calculates the average value in real-time during sampling. Eliminating the need for memory reduces the cost of semiconductor testing equipment, and more importantly, improves testing speed and efficiency. This testing method is very valuable in situations where an average value needs to be obtained in a timely manner, or in scenarios where the size and power consumption of the device cannot be reduced without storage. It is especially valuable in Internet of Things (IoT) applications, where sensors need to measure a certain physical quantity, such as temperature and humidity. Due to the limitations of sensor power supply and size, real-time monitoring is required, but at the same time, interference within the normal range needs to be filtered out, which requires the use of a moving average. In such cases, the use of this invention is essential.

[0056] According to an embodiment of the present invention, a method for measuring the average value over a long period of time with zero memory acquires the measured value of the measurement signal in real time; dynamically updates the average value of the measurement based on the measured value and an iterative algorithm; determines the current measurement count and checks whether the current measurement count exceeds the processor's numerical limit; if it is determined that the current measurement count exceeds the processor's numerical limit, overflow processing of the measurement length is performed. This method does not require storing all sampling points, does not require memory, calculates the average value in real time during sampling, reduces costs, and improves the speed and efficiency of the measurement signal.

[0057] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0058] According to one aspect of the present invention, a measurement system for measuring average values ​​over a long period of time with zero memory is also proposed. Figure 2 This is a schematic diagram of a measurement system for measuring the average value over a long period of time with zero memory, according to an embodiment of the present invention; as shown. Figure 2 As shown, it includes:

[0059] The acquisition module 210 is used to acquire the measured values ​​of the measurement signal in real time;

[0060] Update module 220 is used to dynamically update the average value of the measurement based on the measured value and the iterative algorithm;

[0061] The processing module 230 is used to determine the current number of measurements and whether the current number of measurements exceeds the upper limit of the processor value. If it is determined that the current number of measurements exceeds the upper limit of the processor value, overflow processing of the measurement length is performed.

[0062] According to an embodiment of the present invention, a measurement system for long-term, zero-memory measurement of average values ​​acquires measurement values ​​of measurement signals in real time; dynamically updates the average value of the measurements based on the measured values ​​and an iterative algorithm; determines the current number of measurements and checks whether the current number of measurements exceeds the processor's numerical limit; if it is determined that the current number of measurements exceeds the processor's numerical limit, overflow processing of the measurement length is performed. This method does not require storing all sampling points, can operate without memory, calculates the average value simultaneously with sampling, reduces costs, and improves the speed and efficiency of measurement signals.

[0063] Optionally, update module 220, specifically for Where M(n) represents the average value, M(n-1) represents the average value of the (n-1)th measurement, a(n) represents the measured value, n represents the current measurement number, and n≥1.

[0064] Optionally, the processing module 230 is configured to, when determining that the current number of measurements exceeds the upper limit of the processor's numerical value, decompose the current number of measurements n into n = k·N + i, where k represents the cumulative overflow count, i represents the remainder in the current period, 0 < i ≤ N, and N represents the upper limit of the processor's numerical value; according to Calculate the increment term, where δ = a(n) - M(n-1).

[0065] Optionally, the system further includes a discard module for determining an outlier rejection range, the outlier rejection range including a first preset value and a second preset value; determining whether the measured value is within the outlier rejection range; and discarding the measured value if it is determined that the measured value is not within the outlier rejection range.

[0066] Optionally, the first preset value and the second preset value are dynamically configured based on the application scenario.

[0067] According to one aspect of the present invention, an electronic device is provided.

[0068] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 3 As shown, an electronic device may include one or more ( Figure 3 Only one is shown in the image. A processor 102 (which may include, but is not limited to, a microprocessor unit (MPU) or a programmable logic device (PLD)) and a memory 104 for storing data are also shown. In one exemplary embodiment, the electronic device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 3 The structure shown is for illustrative purposes only and does not limit the structure of the terminal device described above. For example, the terminal device may also include components that are more... Figure 3 The more or fewer components shown, or having the same Figure 3 Equivalent functions or ratios shown Figure 3 The functions shown have more different configurations.

[0069] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the zero-memory long-term average measurement method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to terminal devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0070] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the switching device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0071] This invention proposes a non-transient computer-readable storage medium storing computer instructions for causing the computer to perform a measurement method for measuring the average value over a long period of time with zero memory.

[0072] The applicant of this invention has provided a detailed description of the embodiments of the invention in conjunction with the accompanying drawings. However, those skilled in the art should understand that the above embodiments are merely preferred embodiments of the invention. The detailed description is only intended to help readers better understand the spirit of the invention and is not intended to limit the scope of protection of the invention. On the contrary, any improvements or modifications made based on the inventive spirit of the invention should fall within the scope of protection of the invention.

[0073] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0074] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.

Claims

1. A method for measuring the average value over a long period of time, characterized in that, The method includes: S1, Real-time acquisition of the measured value of the measurement signal, wherein the measured value of the measurement signal is acquired based on semiconductor equipment or Internet of Things sensor; S2, dynamically update the average value of the measurements based on the measured values ​​and the iterative algorithm; S3, determine the current number of measurements, and determine whether the current number of measurements exceeds the processor's numerical limit. If it is determined that the current number of measurements exceeds the processor's numerical limit, perform overflow processing of the measurement length. The process of dynamically updating the average value of the measurements based on the measured values ​​and the iterative algorithm includes: ,in, This represents the average value. This represents the average value of the (n-1)th iteration. The value represents the measured value, and n represents the current number of measurements, where n ≥ 1; only the current average value needs to be stored. And for the current number of measurements n, there is no need to save historical data; Wherein, if it is determined that the current number of measurements exceeds the processor's numerical limit, overflow processing of the measurement length is performed, including: If it is determined that the current number of measurements exceeds the upper limit of the processor value, the current number of measurements n is decomposed into n = k·N + i, where k represents the cumulative overflow number, i represents the remainder in the current period, 0 < i ≤ N, and N represents the upper limit of the processor value. according to Calculate the increment term, where, .

2. The method for measuring the average value over a long period of time according to claim 1, characterized in that, The method further includes: Determine the range for outlier removal, wherein the range for outlier removal includes a first preset value and a second preset value; Determine whether the measured value is within the outlier removal range; If the measured value is determined to be outside the range of outliers, the measured value is discarded.

3. The method for measuring the average value over a long period of time according to claim 2, characterized in that, The first preset value and the second preset value are dynamically configured based on the application scenario.

4. A measurement system for measuring average values ​​over a long period of time, characterized in that, The system includes: The acquisition module is used to acquire the measured values ​​of the measurement signal in real time, wherein the measured values ​​of the measurement signal are acquired based on semiconductor devices or Internet of Things sensors; An update module is used to dynamically update the average value of the measurements based on the measured values ​​and the iterative algorithm; The processing module is used to determine the current number of measurements and whether the current number of measurements exceeds the upper limit of the processor value. If it is determined that the current number of measurements exceeds the upper limit of the processor value, overflow processing of the measurement length is performed. Specifically, the update module is used for: ,in, This represents the average value. This represents the average value of the (n-1)th iteration. The value represents the measured value, and n represents the current number of measurements, where n ≥ 1; only the current average value needs to be stored. And for the current number of measurements n, there is no need to save historical data; Specifically, the processing module is used to decompose the current measurement count n into n = k·N + i when it is determined that the current measurement count exceeds the upper limit of the processor value, where k represents the cumulative overflow count, i represents the remainder in the current period, 0 < i ≤ N, and N represents the upper limit of the processor value. according to Calculate the increment term, where, .

5. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 3.

6. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Real-time energy tracking method and system

    GB202315709D0

  • Method for real-time auto-detection of outliers

    US7277843B1