Anti-interference processing method and device for instantaneous quantity of measuring instrument
By cyclically reading and processing the instantaneous quantity data of the measuring instrument, the problem of the sample value offset caused by interference during operation is solved, and the sampling accuracy is improved.
Patent Information
- Application Number
- CN202510336044.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-03-21
AI Technical Summary
The instantaneous quantity sensor of the measuring instrument is easily disturbed by static electricity, surges, etc. during operation, resulting in offsetting of the sampling value and display errors.
By initializing the instantaneous amount of the measuring instrument, reading multiple instantaneous amount data cycled by calculating the absolute value of the difference between each data and the initial instantaneous amount, selecting the data with the smallest difference for average processing after sorting, and updating the instantaneous amount until the preset cycle termination condition is met.
It effectively avoids interference from instantaneous quantity sensors during operation, and improves the sampling accuracy of the instantaneous quantity value of the measuring instrument.
Smart Images

Figure CN119845308A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of measuring instruments, and in particular to an anti-interference processing method and device for instantaneous quantities of a measuring instrument. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] Measuring instruments, including measurement terminals and concentrators, all have instantaneous quantity functions, including voltage, current, power, temperature, etc. Since these instantaneous quantity sensors are easily disturbed by static electricity, surges, etc. during operation, which may cause sudden changes in the sampling values, the traditional approach is to take samples and average them, or to remove the maximum and minimum values before averaging. These approaches are prone to deviations in the case of more interference values, resulting in display errors. Summary of the invention
[0004] The embodiment of the present invention provides an anti-interference processing method for instantaneous value of a measuring instrument, which is used to improve the sampling accuracy of the instantaneous value of the measuring instrument. The method includes: Initialize the instantaneous quantity of the measuring instrument to obtain the initial instantaneous quantity; Taking the initial instantaneous value as the initial value, the operation of obtaining the optimal anti-interference instantaneous value is cyclically executed, and the following operations are performed in each cycle: Get the instantaneous quantity of the current cycle; According to the refresh cycle of the instantaneous quantity, N instantaneous quantities are read in a connected manner, where N is a positive integer greater than or equal to 10; For each instantaneous quantity, calculate the absolute value of the difference between the instantaneous quantity and the instantaneous quantity of the previous cycle, and obtain N absolute values of the difference; The absolute values of the N differences are sorted from small to large to generate a sorted difference sequence: In the sorted difference sequence, take the M original data corresponding to the first M smallest differences, where M is a positive integer less than N and greater than or equal to 2; Take the average of the M original data taken out to get the updated instantaneous value; When the preset cycle termination condition is not met, the updated instantaneous quantity is used as the instantaneous quantity of the measuring instrument for the next cycle to perform the next cycle cycle operation until the updated instantaneous quantity of the corresponding cycle when the preset cycle termination condition is met is obtained as the optimal anti-interference instantaneous quantity.
[0005] The embodiment of the present invention further provides an anti-interference processing device for instantaneous value of a measuring instrument, which is used to improve the sampling accuracy of the instantaneous value of the measuring instrument. The device includes: An initialization unit is used to initialize the instantaneous quantity of the measuring instrument to obtain the initial instantaneous quantity; The cyclic updating unit is used to cyclically execute the operation of obtaining the optimal anti-interference instantaneous value with the initial instantaneous value as the initial value, and each cycle performs the following operations: Get the instantaneous value of the measuring instrument in the current cycle; According to the refresh cycle of the instantaneous quantity measuring instrument, N instantaneous quantities are read in a connected manner, where N is a positive integer greater than or equal to 10; For each instantaneous quantity, calculate the absolute value of the difference between the instantaneous quantity and the instantaneous quantity of the previous cycle, and obtain N absolute values of the difference; The absolute values of the N differences are sorted from small to large to generate a sorted difference sequence: In the sorted difference sequence, take the M original data corresponding to the first M smallest differences, where M is a positive integer less than N and greater than or equal to 2; Take the average of the M original data taken out to get the updated instantaneous value; The optimal anti-interference instantaneous quantity determination unit is used to use the updated instantaneous quantity as the instantaneous quantity of the measuring instrument for the next cycle to perform the next cycle operation when the preset cycle termination condition is not met, until the updated instantaneous quantity of the corresponding cycle when the preset cycle termination condition is met is obtained as the optimal anti-interference instantaneous quantity.
[0006] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the anti-interference method for instantaneous quantities of the measuring instrument when executing the computer program.
[0007] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the anti-interference method for instantaneous quantities of the measuring instrument is implemented.
[0008] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the anti-interference method for instantaneous quantities of a measuring instrument is implemented.
[0009] Compared with the technical solutions in the prior art that take sampling and averaging or remove the maximum and minimum values before averaging to avoid the instantaneous quantity sensor from being easily disturbed by static electricity, surges, etc. during operation, which may cause sudden changes in the sampled value, the instantaneous quantity value is still easily offset. The anti-interference processing solution for the instantaneous quantity of the measuring instrument provided in the embodiment of the present invention is as follows: initializing the instantaneous quantity of the measuring instrument to obtain the initial instantaneous quantity; taking the initial instantaneous quantity as the initial value, cyclically executing the operation of obtaining the optimal anti-interference instantaneous quantity, and performing the following operations in each cycle: obtaining the instantaneous quantity of the current cycle; reading N instantaneous quantities in a continuous manner according to the refresh cycle of the instantaneous quantity, where N is a positive integer greater than or equal to 10; for each instantaneous quantity, calculating the absolute value of the difference between the instantaneous quantity and the instantaneous quantity of the previous cycle, and obtaining the absolute values of the N differences; sorting the absolute values of the N differences from small to large to generate a sorted difference sequence; in the sorted difference sequence, taking the M original data corresponding to the first M smallest differences, where M is a positive integer less than N and greater than or equal to 2; The original data are averaged to obtain the updated instantaneous quantity; when the preset cycle termination condition is not met, the updated instantaneous quantity is used as the instantaneous quantity of the measuring instrument for the next cycle to perform the next cycle operation until the updated instantaneous quantity of the corresponding cycle when the preset cycle termination condition is met is obtained as the optimal anti-interference instantaneous quantity, which can avoid the interference of static electricity, surge and the like that the instantaneous quantity measuring instrument is easily affected by during operation, and improve the sampling accuracy of the instantaneous value of the measuring instrument. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings: Figure 1 Schematic diagram of the flow of the anti-interference processing method of the instantaneous quantity of the measuring instrument in the embodiment of the present invention; Figure 2 It is a flow chart of an anti-interference processing method for instantaneous quantity of a measuring instrument in another embodiment of the present invention; Figure 3 It is a flow chart of an anti-interference processing method for instantaneous quantity of a measuring instrument in another embodiment of the present invention; Figure 4 It is a flow chart of an anti-interference processing method for instantaneous quantity of a measuring instrument in another embodiment of the present invention; Figure 5 It is a structural schematic diagram of an anti-interference processing device for instantaneous quantities of a measuring instrument in an embodiment of the present invention; Figure 6The figure is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0011] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0012] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0013] Figure 1 FIG. 1 is a flow chart of an anti-interference processing method for instantaneous quantities of a measuring instrument according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps: Step 101: Initialize the instantaneous quantity of the measuring instrument to obtain the initial instantaneous quantity; Step 102: Taking the initial instantaneous value as the initial value, cyclically executing the operation of obtaining the optimal anti-interference instantaneous value, each cycle performs the following operations: Step 1021: Obtain the instantaneous quantity of the current cycle; Step 1022: according to the refresh cycle of the instantaneous quantity, read N instantaneous quantities in succession, where N is a positive integer greater than or equal to 10; Step 1023: For each instantaneous quantity, calculate the absolute value of the difference between the instantaneous quantity and the instantaneous quantity of the previous cycle, and obtain N absolute values of the difference; Step 1024: sort the absolute values of the N differences from small to large to generate a sorted difference sequence; Step 1025: In the sorted difference sequence, take the M original data corresponding to the first M smallest differences, where M is a positive integer less than N and greater than or equal to 2; Step 1026: average the M original data retrieved to obtain the updated instantaneous value; Step 103: When the preset cycle termination condition is not met, the updated instantaneous quantity is used as the instantaneous quantity of the measuring instrument for the next cycle to perform the next cycle cycle operation until the updated instantaneous quantity of the corresponding cycle when the preset cycle termination condition is met is obtained as the optimal anti-interference instantaneous quantity.
[0014] Depend on Figure 1It can be seen that the anti-interference processing method for the instantaneous quantity of the measuring instrument provided by the embodiment of the present invention, when working: initialize the instantaneous quantity of the measuring instrument to obtain the initial instantaneous quantity; use the initial instantaneous quantity as the initial value, cyclically execute the operation of obtaining the optimal anti-interference instantaneous quantity, and perform the following operations in each cycle: obtain the instantaneous quantity of the measuring instrument in the current cycle; according to the refresh cycle of the instantaneous quantity, read N instantaneous quantities in a connected manner, N is a positive integer greater than or equal to 10; for each instantaneous quantity, calculate the absolute value of the difference between the instantaneous quantity and the instantaneous quantity of the previous cycle, and obtain the absolute values of N differences; sort the absolute values of the N differences from small to large to generate a sorted difference sequence; in the sorted difference sequence, take the M original data corresponding to the first M smallest differences, M is a positive integer less than N and greater than or equal to 2; The original data are averaged to obtain the updated instantaneous quantity; when the preset cycle termination condition is not met, the updated instantaneous quantity is used as the instantaneous quantity of the measuring instrument for the next cycle to perform the next cycle operation until the updated instantaneous quantity of the corresponding cycle when the preset cycle termination condition is met is obtained as the optimal anti-interference instantaneous quantity.
[0015] Compared with the prior art, in order to avoid the instantaneous quantity sensor being easily disturbed by static electricity, surges, etc. during operation, which may cause the sampling value to change suddenly, the instantaneous quantity value is still easily offset by taking sampling and averaging, or removing the maximum and minimum values before averaging. The anti-interference processing method of the instantaneous quantity of the measuring instrument provided in the embodiment of the present invention can avoid the static electricity, surges, etc. that the instantaneous quantity measuring instrument is easily disturbed during operation, and improve the sampling accuracy of the instantaneous quantity value of the measuring instrument. The anti-interference processing method of the instantaneous quantity of the measuring instrument is described in detail below.
[0016] The embodiment of the present invention provides an anti-interference processing method for the instantaneous quantity of a measuring instrument. The method first initializes an instantaneous quantity and then continuously reads multiple instantaneous quantity data. Next, the absolute value of the difference between each read data and the initial instantaneous quantity is calculated, and these differences are sorted. And several data with the smallest difference are selected, and their average value is calculated as the new instantaneous quantity. The algorithm utilizes the inherent law of instantaneous quantity changes in a short period of time, improves the anti-interference ability of the instantaneous value, and improves the accuracy of the data. A detailed introduction is given below.
[0017] In one embodiment, in the above step 101, the types of the instantaneous quantity may include: voltage, current, power and temperature.
[0018] In specific implementation, the types of the instantaneous quantities mentioned above may also include: humidity, power, etc.
[0019] In the above step 102, step 102 is a cyclic optimization process: taking the initial instantaneous value as the initial value, cyclically executing the operation of obtaining the optimal anti-interference instantaneous value, each cycle performs the following operations: Step 1021: Obtain the instantaneous value of the measuring instrument in the current cycle; for example, if it is the first cycle, then the instantaneous value of the measuring instrument in the current cycle is the initial instantaneous value mentioned above; Step 1022: according to the refresh cycle of the instantaneous quantity, read N instantaneous quantities in succession, where N is a positive integer greater than or equal to 10; Step 1023: For each instantaneous quantity, calculate the absolute value of the difference between the instantaneous quantity and the instantaneous quantity of the previous cycle, and obtain N absolute values of the difference; Step 1024: sort the absolute values of the N differences from small to large to generate a sorted difference sequence; Step 1025: In the sorted difference sequence, take the M original data corresponding to the first M smallest differences, where M is a positive integer less than N and greater than or equal to 2; Step 1026: average the M original data retrieved to obtain the updated instantaneous value.
[0020] In one embodiment, in the above step 103, the preset cycle termination condition is to meet a preset number of cycle periods.
[0021] In a specific implementation, the preset loop termination condition may also be that the updated instantaneous value is within a preset condition threshold range.
[0022] In one embodiment, Figure 2 As shown, the anti-interference processing method for the instantaneous quantity of the measuring instrument may further include step 104: adjusting N and M according to the intensity of interference to the instantaneous quantity during operation to achieve the best anti-interference effect.
[0023] In specific implementation, adjusting N and M according to the intensity of interference to the instantaneous quantity during operation can further improve the accuracy of the optimal anti-interference instantaneous quantity, thereby achieving the optimal anti-interference effect.
[0024] In one embodiment, N and M are adjusted according to the intensity of interference to the instantaneous quantity during operation to achieve the best anti-interference effect, including: adjusting N and M according to an optimization adjustment model, wherein the optimization adjustment model is pre-trained and generated based on a sample of the relationship between the intensity data of the interference and the values of N and M.
[0025] In specific implementation, the marked interference intensity data and N and M value sample data can be used to pre-train and generate an optimization adjustment model. After the model is generated, the optimization adjustment model is used to predict and determine the N and M values. The input of the optimization adjustment model can be the current interference intensity data, and the output of the optimization adjustment model can be the N and M values. By adjusting the N and M values according to the optimization adjustment model, the prediction accuracy and efficiency of the N and M values can be improved, thereby further improving the accuracy and efficiency of the optimal anti-interference instantaneous quantity.
[0026] In one embodiment, Figure 3 As shown, the anti-interference processing method for the instantaneous quantity of the measuring instrument may further include step 105: optimizing and adjusting the refresh cycle of the instantaneous quantity of the measuring instrument after a preset period of time.
[0027] In specific implementation, after a preset period of time, optimizing and adjusting the refresh cycle of the instantaneous quantity of the measuring instrument can further improve the accuracy of the optimal anti-interference instantaneous quantity, thereby achieving the optimal anti-interference effect.
[0028] In order to facilitate understanding of how the present invention is implemented, Figure 4 Let me give you an example to illustrate this.
[0029] The instantaneous quantity anti-interference processing method provided by the embodiment of the present invention has the following operation flow: Figure 4 As shown: 1. Initialize instantaneous quantity f init, which is step 101 above, 2. According to the refresh cycle of the sensor (such as voltage), connect and read N instantaneous quantities f 1, f 2,…, f . The minimum value of N is 10; 3. For each instantaneous quantity fn ( n =1,2,…, N ), calculate its difference with the initial instantaneous quantity f The absolute value of the difference of init: Δ xn =∣ fn − f init|Generate N Difference: Δ x 1,Δ x 2,…,Δ xN; 4. Yes N The difference Δ xn Sort from small to large to generate a sorted difference sequence: Δ y 1,Δ y 2,…,Δ yN; 5. After sorting, the difference sequence Δy Among them, take out the M with the smallest difference fn, Before M(M <N) The original data corresponding to the smallest difference fm; 6. For the selected M Raw data fm Take the average to get the updated instantaneous value f new; The above steps 2 to 6 are the above step 102 .
[0030] 7. f init is updated to f new, jump to the second step, continue the next round of data reading and processing, until the optimal instantaneous value is found, that is, the above step 103; 8. Algorithmically, N and M can be adjusted according to the strength of the interference to achieve the best anti-interference effect, that is, the above step 104.
[0031] To sum up, the beneficial technical effect of the anti-interference processing method for the instantaneous quantity of the measuring instrument provided by the embodiment of the present invention is: this method utilizes the changes in instantaneous quantities in a short period of time, which can avoid interference from static electricity, surges, etc. that the instantaneous quantity is susceptible to during operation, thereby improving the anti-interference ability of the instantaneous value and improving the accuracy of sampling of the instantaneous value of the measuring instrument.
[0032] The present invention also provides an anti-interference processing device for measuring the instantaneous quantity of an instrument, as described in the following embodiments. Since the principle of the device to solve the problem is similar to the anti-interference processing method for measuring the instantaneous quantity of an instrument, the implementation of the device can refer to the implementation of the anti-interference processing method for measuring the instantaneous quantity of an instrument, and the repeated parts will not be repeated.
[0033] Figure 5 FIG. 1 is a schematic diagram of the structure of the anti-interference processing device for instantaneous quantity of the measuring instrument in an embodiment of the present invention. Figure 5 As shown, the device comprises: Initialization unit 01 is used to initialize the instantaneous quantity of the measuring instrument to obtain the initial instantaneous quantity; The cyclic updating unit 02 is used to cyclically execute the operation of obtaining the optimal anti-interference instantaneous value with the initial instantaneous value as the initial value, and each cycle period performs the following operations: Get the instantaneous value of the measuring instrument in the current cycle; According to the refresh cycle of the instantaneous quantity, N instantaneous quantities are read in a connected manner, where N is a positive integer greater than or equal to 10; For each instantaneous quantity, calculate the absolute value of the difference between the instantaneous quantity and the instantaneous quantity of the previous cycle, and obtain N absolute values of the difference; Sorting the absolute values of the N differences from small to large to generate a sorted difference value sequence; In the sorted difference sequence, take the M original data corresponding to the first M smallest differences, where M is a positive integer less than N and greater than or equal to 2; Take the average of the M original data taken out to get the updated instantaneous value; The optimal anti-interference instantaneous quantity determination unit 103 is used to use the updated instantaneous quantity as the measuring instrument instantaneous quantity of the next cycle to perform the next cycle cycle operation when the preset cycle termination condition is not met, until the updated instantaneous quantity of the corresponding cycle when the preset cycle termination condition is met is obtained as the optimal anti-interference instantaneous quantity.
[0034] In one embodiment, the above-mentioned anti-interference processing device for instantaneous quantity of the measuring instrument may further include: a first optimization adjustment unit, configured to adjust N and M according to the intensity of interference to which the instantaneous quantity measuring instrument is subjected during operation, so as to achieve the best anti-interference effect.
[0035] In one embodiment, the first optimization adjustment unit is specifically used to: adjust N and M according to an optimization adjustment model, where the optimization adjustment model is pre-trained and generated based on relationship samples between interference intensity data and N and M values.
[0036] In one embodiment, the types of the instantaneous quantity include: voltage, current, power and temperature.
[0037] In one embodiment, the preset cycle termination condition is satisfying a preset number of cycle periods.
[0038] In one embodiment, the anti-interference processing device for instantaneous quantities of the measuring instrument may further include a second optimization adjustment unit, which is used to optimize and adjust the refresh cycle of the instantaneous quantities of the measuring instrument after a preset period of time.
[0039] Based on the above invention concept, Figure 6 As shown, the present invention also proposes a computer device 500, including a memory 510, a processor 520, and a computer program 530 stored in the memory 510 and executable on the processor 520, wherein the processor 520 implements the aforementioned fund information processing method when executing the computer program 530.
[0040] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the anti-interference processing method for instantaneous quantities of the measuring instrument is implemented.
[0041] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the anti-interference processing method for instantaneous quantities of a measuring instrument is implemented.
[0042] Compared with the technical solutions in the prior art that, in order to avoid the instantaneous quantity sensor being easily disturbed by static electricity, surge, etc. during operation and causing the sampling value to suddenly change, the instantaneous quantity value is still easily offset by taking the sampling average or removing the maximum and minimum values before taking the average. The anti-interference processing solution for the instantaneous quantity of the measuring instrument provided in the embodiment of the present invention is as follows: initializing the instantaneous quantity of the measuring instrument to obtain the initial instantaneous quantity; taking the initial instantaneous quantity as the initial value, cyclically executing the operation of obtaining the optimal anti-interference instantaneous quantity, and performing the following operations in each cycle: obtaining the instantaneous quantity of the measuring instrument in the current cycle; reading N instantaneous quantities in a continuous manner according to the refresh cycle of the instantaneous quantity, where N is a positive integer greater than or equal to 10; for each instantaneous quantity, calculating the absolute value of the difference between the instantaneous quantity and the instantaneous quantity of the previous cycle, and obtaining the absolute values of the N differences; sorting the absolute values of the N differences from small to large to generate a sorted difference sequence; in the sorted difference sequence, taking the M original data corresponding to the first M smallest differences, where M is a positive integer less than N and greater than or equal to 2; The original data are averaged to obtain the updated instantaneous quantity; when the preset cycle termination condition is not met, the updated instantaneous quantity is used as the instantaneous quantity of the measuring instrument for the next cycle to perform the next cycle operation until the updated instantaneous quantity of the corresponding cycle when the preset cycle termination condition is met is obtained as the optimal anti-interference instantaneous quantity, which can avoid the interference of static electricity, surge and the like that the instantaneous quantity is easily affected by during operation, and improve the sampling accuracy of the instantaneous value of the measuring instrument.
[0043] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0044] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0045] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0046] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0047] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for anti-interference processing of instantaneous quantities of a measuring instrument, characterized in that: include: Initialize the instantaneous quantity of the measuring instrument to obtain the initial instantaneous quantity; Taking the initial instantaneous value as the initial value, the operation of obtaining the optimal anti-interference instantaneous value is cyclically executed, and the following operations are performed in each cycle: Get the instantaneous value of the measuring instrument in the current cycle; According to the refresh cycle of the instantaneous quantity, N instantaneous quantities are read in a connected manner, where N is a positive integer greater than or equal to 10; For each instantaneous quantity, calculate the absolute value of the difference between the instantaneous quantity and the instantaneous quantity of the previous cycle, and obtain N absolute values of the difference; Sorting the absolute values of the N differences from small to large to generate a sorted difference value sequence; In the sorted difference sequence, take the M original data corresponding to the first M smallest differences, where M is a positive integer less than N and greater than or equal to 2; Take the average of the M original data taken out to get the updated instantaneous value; When the preset cycle termination condition is not met, the updated instantaneous quantity is used as the instantaneous quantity of the measuring instrument for the next cycle to perform the next cycle cycle operation until the updated instantaneous quantity of the corresponding cycle when the preset cycle termination condition is met is obtained as the optimal anti-interference instantaneous quantity.
2. The method according to claim 1, characterized in that Also includes: Adjust N and M according to the intensity of interference to the instantaneous quantity during operation to achieve the best anti-interference effect.
3. The method according to claim 2, characterized in that According to the intensity of interference to the instantaneous quantity during operation, N and M are adjusted to achieve the best anti-interference effect, including: adjusting N and M according to an optimization adjustment model, wherein the optimization adjustment model is pre-trained and generated based on a sample of the relationship between the intensity data of the interference and the values of N and M.
4. The method according to claim 1, characterized in that The types of instantaneous quantities include: voltage, current, power and temperature.
5. The method according to claim 1, characterized in that The preset cycle termination condition is to meet the preset number of cycle periods.
6. The method according to claim 1, characterized in that Also includes: After a preset period of time, optimize and adjust the refresh cycle of the instantaneous quantity of the measuring instrument.
7. An anti-interference processing device for measuring the instantaneous quantity of an instrument, characterized in that: include: An initialization unit is used to initialize the instantaneous quantity of the measuring instrument to obtain the initial instantaneous quantity; The cyclic updating unit is used to cyclically execute the operation of obtaining the optimal anti-interference instantaneous value with the initial instantaneous value as the initial value, and each cycle performs the following operations: Get the instantaneous value of the measuring instrument in the current cycle; According to the refresh cycle of the instantaneous quantity, N instantaneous quantities are read in a connected manner, where N is a positive integer greater than or equal to 10; For each instantaneous quantity, calculate the absolute value of the difference between the instantaneous quantity and the instantaneous quantity of the previous cycle, and obtain N absolute values of the difference; Sorting the absolute values of the N differences from small to large to generate a sorted difference value sequence; In the sorted difference sequence, take the M original data corresponding to the first M smallest differences, where M is a positive integer less than N and greater than or equal to 2; Take the average of the M original data taken out to get the updated instantaneous value; The optimal anti-interference instantaneous quantity determination unit is used to use the updated instantaneous quantity as the instantaneous quantity of the measuring instrument for the next cycle to perform the next cycle operation when the preset cycle termination condition is not met, until the updated instantaneous quantity of the corresponding cycle when the preset cycle termination condition is met is obtained as the optimal anti-interference instantaneous quantity.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Composite software filtering method and system applied to AD collection
CN109450405A
Method for carrying out anti-interference processing on measurement data in cable communication measurement process
CN109981141A
Lithium battery energy storage adaptive high-precision electric quantity metering method and system and storage medium
CN114325429A
Method and system for improving output stability of instrument and readable storage medium
CN117804504A
Model training method based on gradient variance reduction and data rearrangement
CN118863099A