Error level value identification method and device and nonvolatile storage medium
By obtaining the set of level values of two adjacent time periods of the Hall transmitter sensing level value, calculating the average and useful averages, identifying the error level value, the problem of identifying error level values during the Hall transmitter transmission is solved, and a fast and effective recognition effect is achieved.
Patent Information
- Application Number
- CN202510030693.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-05-06
AI Technical Summary
When the Hall transmitter transmits the level value to the microcontroller, it often causes error values to occur, resulting in the inability to quickly and effectively determine whether the power transformer produces DC bias. The existing technology lacks effective solutions.
By obtaining the set of level values of two adjacent time periods of the Hall transmitter sensing level value, calculate the average and useful averages in each time period, determine whether there is an error level value, and then quickly identify the error level value.
It realizes the rapid and efficient identification of error level values during the transmission of Hall transmitter, and improves the efficiency and accuracy of error level values recognition.
Smart Images

Figure CN119936456A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power parameter processing, and in particular to an error level value recognition method, device, and non-volatile storage medium. Background Art
[0002] When the Hall sensor transmits the sensed level value to the microcontroller, error values are often generated, which is not conducive to the accuracy and reliability of determining whether the power transformer generates DC bias magnetism. The error value of the level value can be effectively detected by induction (such as error induction method, deviation induction method, etc.). However, due to the complexity of the parameters of the sensor and the difference of the circuit, the induction method is not compatible. In addition, the identification of error level values based on neural networks has good accuracy and reliability, and can also be compatible with the complexity of the parameters of different sensors and the difference of circuits. However, this requires a large number of learning samples and complex algorithms to construct the neural network, which often increases the cost and complexity of level processing.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a method, device and non-volatile storage medium for identifying an erroneous level value, so as to at least solve the technical problem that an erroneous level value occurring in the process of transmitting a sensing level value from a Hall transmitter to a single-chip microcomputer cannot be determined quickly and effectively.
[0005] According to one aspect of an embodiment of the present invention, a method for identifying an erroneous level value is provided, comprising: obtaining a level value set corresponding to each of time interval one and time interval two, wherein time interval one and time interval two are two adjacent time periods when a Hall transmitter senses a level value; in the level value set corresponding to time interval one, determining the average of the level values within a predetermined interval as a first average; determining, based on the first average, whether the level value set of time interval two includes a target level value; if the level value set of time interval two does not include the target level value, determining a useful average of the level value set of time interval two; and determining, based on the useful average of time interval two, whether there is an erroneous level value in the level value set of time interval two.
[0006] Optionally, in the level value set corresponding to the time interval one, determining the average of the level values located in the predetermined interval as the first average includes: in the level value set corresponding to the time interval one, determining multiple level values located in the predetermined interval; and calculating the average of the multiple level values located in the predetermined interval as the first average.
[0007] Optionally, determining whether the level value set of time interval two includes the target level value based on the first average includes: determining the target interval including the first average based on the first average; if there is no level value within the target interval in the level value set of time interval two, the target level value is not included in time interval two.
[0008] Optionally, if the level value set of time interval two does not include the target level value, determining the useful mean of time interval two includes: removing the highest level value and the lowest level value in time interval two to obtain the remaining level value; calculating the average of the remaining level values as a second average, and using the second average as the useful mean of time interval two.
[0009] Optionally, determining whether there is an erroneous level value in the level value set of time interval two based on the useful mean of time interval two includes: judging whether the useful mean is within a predetermined degree range; if the useful mean of time interval two is within the predetermined degree range, determining that there is no erroneous level value in the level value set of time interval two; if the useful mean of time interval two is not within the predetermined degree range, determining that there is an erroneous level value in the level value set of time interval two.
[0010] Optionally, if the useful mean of time interval two is not within a predetermined range, it is determined that there is an error level value in the level value set of time interval two, including: subtracting the first mean from each level value in the level value set of time interval two to obtain multiple differences; when there is a difference whose absolute value is lower than the target critical value among the multiple differences, it is determined that there is no error level value in the level value set of time interval two; when the absolute values of the multiple differences are all higher than the target critical value, the level value corresponding to the difference whose absolute value is higher than the target critical value is used as the error level value in time interval two.
[0011] According to another aspect of an embodiment of the present invention, there is provided an apparatus for identifying an erroneous level value, comprising: an acquisition module, configured to acquire a set of level values corresponding to each of time interval one and time interval two, wherein time interval one and time interval two are two adjacent time periods when a Hall transducer senses a level value; a first determination module, configured to determine, in the set of level values corresponding to time interval one, an average of level values within a predetermined interval as a first average; a second determination module, configured to determine, based on the first average, whether the set of level values for time interval two includes a target level value; a third determination module, configured to determine, if the set of level values for time interval two does not include the target level value, a useful average of the set of level values for time interval two; and a fourth determination module, configured to determine, based on the useful average of time interval two, whether there is an erroneous level value in the set of level values for time interval two.
[0012] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided. The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing any one of the error level value identification methods.
[0013] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the error level value identification methods.
[0014] According to yet another aspect of the embodiments of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements any one of the above-mentioned error level value identification methods.
[0015] In an embodiment of the present invention, by obtaining the level value sets corresponding to time interval one and time interval two, wherein time interval one and time interval two are two adjacent time periods when the Hall transmitter senses the level value; in the level value set corresponding to time interval one, the average of the level values within the predetermined interval is determined as the first average; according to the first average, it is determined whether the level value set of time interval two contains the target level value; if the level value set of time interval two does not contain the target level value, the useful average of the level value set of time interval two is determined; according to the useful average of time interval two, it is determined whether there is an erroneous level value in the level value set of time interval two. The technical problem that the erroneous level value that occurs in the process of the Hall transmitter transmitting the sensed level value to the single-chip microcomputer is solved, and the purpose of quickly and effectively determining the erroneous level value that occurs in the process of the Hall transmitter transmitting the sensed level value to the single-chip microcomputer is achieved, thereby achieving the technical effect of improving the efficiency and accuracy of erroneous level value recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0017] Figure 1 is a flow chart of a method for identifying an error level value provided according to an embodiment of the present invention;
[0018] Figure 2 is a schematic diagram of an error level value identification device provided according to an embodiment of the present invention;
[0019] Figure 3 is a schematic diagram of an electronic device provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0022] According to an embodiment of the present invention, a method embodiment for identifying error level values is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0023] Figure 1 is a flow chart of a method for identifying an error level value according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0024] Step S102, obtaining a set of level values corresponding to time interval one and time interval two, wherein time interval one and time interval two are two adjacent time periods when the Hall transmitter senses the level value;
[0025] In this step, in the time series of the sensing level value of the Hall transmitter, two adjacent time periods are selected as time interval one and time interval two, and their corresponding level value sets are respectively obtained.
[0026] Step S104, determining, in the level value set corresponding to the time interval 1, an average of the level values within a predetermined interval as a first average;
[0027] In this step, if more than one level value in the level value set corresponding to the time interval one satisfies the defined interval state, the average of the more than one level values is taken as the first average.
[0028] In an optional embodiment, in a level value set corresponding to time interval one, determining the average of level values within a predetermined interval as a first average includes: in a level value set corresponding to time interval one, determining multiple level values within the predetermined interval; and calculating the average of the multiple level values within the predetermined interval as the first average.
[0029] Optional, according to the sensitivity coefficient of the Hall sensor The current at the neutral point , according to the level value sensed by the Hall transmitter The equation for the current at the neutral point is , in the equation, Characterizes the externally applied reference level value of the Hall transducer and determines the level value sensed by the Hall transducer Permitted lower limit With upper limit , , The highest compliance interval representing the level value, that is, the predetermined interval, selects the level values in the predetermined interval from the level value set of the time interval one and calculates the average of the level values in the predetermined interval as the average of the time interval one.
[0030] Step S106, determining whether the level value set of the second time interval includes the target level value according to the first average value;
[0031] In this step, a target interval including the first average is determined based on the first average, and then it is determined whether there is a level value within the target interval in the level value set included in time interval two. If there is a level value within the target interval in the level value set of time interval two, then the level value is the target level value. If there is no level value within the target interval in the level value set of time interval two, then the target level value is not included in time interval two.
[0032] In an optional embodiment, determining whether the target level value is included in the level value set of time interval two based on the first average includes: determining the target interval including the first average based on the first average; if there is no level value within the target interval in the level value set of time interval two, then the target level value is not included in time interval two.
[0033] Optionally, confirm the decrement obtained by subtracting the mean of the previous time interval from each level value in the level value set of time interval two. If the modulus of one or more decrements is lower than the target critical value, it is confirmed that the level value set of time interval two contains the target level value; if the modulus of one or more decrements is not lower than the target critical value, it is confirmed that the level value combination of time interval two does not contain the target level value.
[0034] Step S108, if the level value set of the second time interval does not include the target level value, determine the useful mean of the level value set of the second time interval;
[0035] In this step, if the level value set of the time interval two does not include the target level value, it is necessary to calculate the useful mean of the time interval two. The useful mean is the average of the remaining level values of the time interval two after removing the upper and lower limits.
[0036] In an optional embodiment, if the level value set of time interval two does not include the target level value, determining the useful mean of time interval two includes: removing the highest level value and the lowest level value in time interval two to obtain the remaining level value; calculating the average of the remaining level values as a second average, and using the second average as the useful mean of time interval two.
[0037] Optionally, confirm the highest level value and the lowest level value in the level value set of time interval two, and remove the highest level value and the lowest level value in the level value set of time interval two to refresh the level value set of time interval two, and use the average of the remaining level values of time interval two after the refresh as the useful mean of time interval two.
[0038] Step S110: determining whether there is an erroneous level value in the level value set of the time interval two according to the useful mean of the time interval two.
[0039] In this step, each level value in the level value set of the time interval two is judged according to the useful mean of the time interval two to determine whether there is an erroneous level value in the time interval two.
[0040] In an optional embodiment, judging the useful mean of time interval two and determining whether there is an erroneous level value in the level value set of time interval two includes: judging whether the useful mean is within a predetermined degree range; if the useful mean of time interval two is within the predetermined degree range, determining that there is no erroneous level value in the level value set of time interval two; if the useful mean of time interval two is not within the predetermined degree range, determining that there is an erroneous level value in the level value set of time interval two.
[0041] Optionally, the useful mean value that satisfies the initial degree quantity state must be between the defined degree quantity 1 and the defined degree quantity 2. If the useful mean value satisfies the initial degree quantity state, there is no error level value in the level value set of the time interval 2. If the useful mean value does not satisfy the initial degree quantity state, it is determined that there is an error level value in the level value set of the time interval 2. The process proceeds to confirm whether there is a level value that satisfies the predetermined interval state in the level value set of the time interval 1, and a warning message is displayed on the single chip to indicate that there is an error level value in the level value set of the time interval 2.
[0042] In an optional embodiment, if the useful mean of time interval two is not within a predetermined range, it is determined that there is an error level value in the level value set of time interval two, including: subtracting the first mean from each level value in the level value set of time interval two to obtain multiple differences; when there is a difference whose absolute value is lower than the target critical value among the multiple differences, it is determined that there is no error level value in the level value set of time interval two; when the absolute values of the multiple differences are all higher than the target critical value, the level value corresponding to the difference whose absolute value is higher than the target critical value is used as the error level value in time interval two.
[0043] Optionally, confirm the modulus of the decrement obtained by subtracting the useful mean from the mean of time interval one. If the mean of time interval one and the decrement of the useful mean are both lower than the target critical value, the amount obtained by subtracting the target critical value from the mean of time interval one is taken as the mean of time interval two, and determine that there is no erroneous level value in the level value set of time interval two; if the decrement obtained by subtracting the mean from the mean of time interval one is higher than the target critical value, the level value corresponding to the difference whose absolute value is higher than the target critical value is taken as the erroneous level value in time interval two, and the amount obtained by adding the mean of the previous time interval to the target critical value is taken as the mean of time interval two of the level value cluster corresponding to the current time interval.
[0044] By obtaining the level value sets corresponding to the time interval one and the time interval two respectively, wherein the time interval one and the time interval two are two adjacent time periods when the Hall transmitter senses the level value; in the level value set corresponding to the time interval one, the average of the level values within the predetermined interval is determined as the first average; according to the first average, it is determined whether the level value set of the time interval two contains the target level value; if the level value set of the time interval two does not contain the target level value, the useful average of the level value set of the time interval two is determined; according to the useful average of the time interval two, it is determined whether there is an erroneous level value in the level value set of the time interval two, thereby solving the technical problem that the erroneous level value occurring in the process of the Hall transmitter transmitting the sensed level value to the single-chip microcomputer cannot be determined quickly and effectively, and the purpose of quickly and effectively determining the erroneous level value occurring in the process of the Hall transmitter transmitting the sensed level value to the single-chip microcomputer is achieved, thereby achieving the technical effect of improving the efficiency and accuracy of identifying the erroneous level value.
[0045] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation mode:
[0046] Step S1, obtaining a set of level values corresponding to time interval one and time interval two, wherein time interval one and time interval two are two adjacent time periods when the Hall transmitter senses the level value;
[0047] In this step, in the time series of the Hall transmitter sensing level value, two adjacent time periods are selected as time interval one and time interval two, and their corresponding level value sets are obtained respectively. The size of each time interval can be defined as a constant, or can be set as a variable amount within a predefined interval, thereby meeting different processing requirements, just as a constant amount can meet general level value processing requirements, and a variable amount can meet special variable level value processing requirements. Time interval one, time interval two, etc. are time sequences determined by gradually delaying them in order of precedence.
[0048] Step S2, in the level value set corresponding to the time interval one, determining the average of the level values located in the predetermined interval as the first average, includes: in the level value set corresponding to the time interval one, determining multiple level values located in the predetermined interval; calculating the average of the multiple level values located in the predetermined interval as the first average.
[0049] Optional, according to the sensitivity coefficient of the Hall sensor The current at the neutral point , according to the level value sensed by the Hall transmitter The equation for the current at the neutral point is , in the equation, Characterizes the externally applied reference level value of the Hall transducer and determines the level value sensed by the Hall transducer Permitted lower limit With upper limit , , The highest compliance interval representing the level value is the predetermined interval. The level values in the predetermined interval are screened out from the level value set of the time interval one and the average of the level values in the predetermined interval is calculated as the average of the time interval one. For example, The current values of the lowest neutral point and the highest neutral point sensed by the Hall sensor are and , , it can be determined that , so the predetermined interval of the level value is , and during the use of the Hall sensor, the sensitivity coefficient of the Hall sensor It will change with the change of time. The interval can be , the sensitivity coefficient of the Hall sensor and the current at the neutral point Produce changes, and There will also be changes, so it will not be affected by the type of sensor and the sensitivity coefficient properties of the sensor, etc. It can be widely compatible with all types of Hall sensors, and improve the compatibility of the method in which the microcontroller determines whether the power transformer has DC bias magnetism based on the corrected level value.
[0050] Step S3, determining whether the level value set of time interval two includes the target level value based on the first average, including: determining the target interval including the first average based on the first average; if there is no level value in the target interval in the level value set of time interval two, then the target level value is not included in time interval two.
[0051] Optionally, confirm the decrement obtained by subtracting the average of the previous time interval from each level value in the level value set of time interval two. If the modulus of one or more decrements is lower than the target critical value, it is confirmed that the level value set of time interval two contains the target level value; if the modulus of one or more decrements is lower than the target critical value, it is confirmed that the level value combination of time interval two does not contain the target level value.
[0052] Step S4, if the level value set of time interval two does not include the target level value, determine the useful mean of time interval two, including: removing the highest level value and the lowest level value in time interval two to obtain the remaining level value; calculating the average of the remaining level values as a second average, and using the second average as the useful mean of time interval two.
[0053] Optionally, confirm the highest level value and the lowest level value in the level value set of time interval two, and remove the highest level value and the lowest level value in the level value set of time interval two to refresh the level value set of time interval two, and use the average of the remaining level values of time interval two after the refresh as the useful mean of time interval two.
[0054] Step S5, determining whether there is an erroneous level value in the level value set of the time interval two according to the useful mean of the time interval two, including: judging whether the useful mean is within a predetermined degree range; if the useful mean of the time interval two is within the predetermined degree range, determining that there is no erroneous level value in the level value set of the time interval two; if the useful mean of the time interval two is not within the predetermined degree range, determining that there is an erroneous level value in the level value set of the time interval two.
[0055] Optionally, the useful mean value that satisfies the initial degree quantity state must be between the defined degree quantity 1 and the defined degree quantity 2. If the useful mean value satisfies the initial degree quantity state, there is no error level value in the level value set of the time interval 2. If the useful mean value does not satisfy the initial degree quantity state, it is determined that there is an error level value in the level value set of the time interval 2. The process proceeds to confirm whether there is a level value that satisfies the predetermined interval state in the level value set of the time interval 1, and a warning message is displayed on the single chip to indicate that there is an error level value in the level value set of the time interval 2.
[0056] Step S51, if the useful mean of time interval two is not within a predetermined range, it is determined that there is an error level value in the level value set of time interval two, including: subtracting the first mean from each level value in the level value set of time interval two to obtain multiple differences; when there is a difference whose absolute value is lower than the target critical value in the multiple differences, it is determined that there is no error level value in the level value set of time interval two; when the absolute values of the multiple differences are all higher than the target critical value, the level value corresponding to the difference whose absolute value is higher than the target critical value is used as the error level value in time interval two.
[0057] Optionally, confirm the modulus of the decrement obtained by subtracting the useful mean from the mean of time interval one. If both the mean of time interval one and the decrement of the useful mean are lower than the target critical value, the amount obtained by subtracting the target critical value from the mean of time interval one is regarded as the mean of time interval two, and determine that there is no error level value in the level value set of time interval two; if the decrement obtained by subtracting the mean from the mean of time interval one is higher than the target critical value, the level value corresponding to the difference whose absolute value is higher than the target critical value is regarded as the error level value in time interval two, and the amount obtained by adding the mean of the previous time interval to the target critical value is regarded as the mean of time interval two of the level value cluster corresponding to the current time interval. For example, the mean of the previous time interval is , the useful mean of the level value cluster corresponding to the current time interval is The degree quantity defined in the initial degree quantity state is , the second degree quantity defined is ;like exist and time interval, then determine the mean of the time intervals minus The modulus of the reduction is defined as , if N is higher than the critical value , just As the mean of the current time interval 2; otherwise, Treat it as the mean of the current time interval.
[0058] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0059] In this embodiment, an error level value recognition device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the terms "module" and "device" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0060] According to an embodiment of the present invention, there is also provided an embodiment of a device for implementing the method for identifying an error level value. Figure 2 is a schematic diagram of an error level value identification device according to an embodiment of the present invention. Figure 2 As shown, the above-mentioned error level value identification device includes an acquisition module 21, a first determination module 22, a second determination module 23, a third determination module 24, and a fourth determination module 25. The device is described below.
[0061] An acquisition module 21 is used to acquire a set of level values corresponding to time interval one and time interval two, wherein time interval one and time interval two are two adjacent time periods when the Hall transmitter senses the level value;
[0062] A first determining module 22, connected to the obtaining module 21, is used to determine, in the level value set corresponding to the time interval one, an average of the level values within a predetermined interval as a first average;
[0063] A second determination module 23, connected to the first determination module 22, is used to determine whether the level value set of the second time interval includes the target level value according to the first average value;
[0064] A third determining module 24, connected to the second determining module 23, is used to determine a useful mean of the level value set of the time interval two if the level value set of the time interval two does not include the target level value;
[0065] The fourth determination module 25 is connected to the third determination module 24, and is used to determine whether there is an erroneous level value in the level value set of the time interval two according to the useful mean of the time interval two.
[0066] In an error level value identification device provided by an embodiment of the present invention, an acquisition module is set to acquire the level value sets corresponding to time interval one and time interval two, respectively, wherein time interval one and time interval two are two adjacent time periods when the Hall transmitter senses the level value; a first determination module is used to determine the average of the level values located in a predetermined interval as a first average in the level value set corresponding to time interval one; a second determination module is used to determine whether the level value set of time interval two includes a target level value according to the first average; a third determination module is used to determine the useful average of the level value set of time interval two if the level value set of time interval two does not include the target level value; a fourth determination module is used to determine whether there is an error level value in the level value set of time interval two according to the useful average of time interval two, thereby solving the technical problem that the error level value occurring in the process of the Hall transmitter transmitting the sensing level value to the single-chip microcomputer cannot be determined quickly and effectively, achieving the purpose of quickly and effectively determining the error level value occurring in the process of the Hall transmitter transmitting the sensing level value to the single-chip microcomputer, and thus achieving the technical effect of improving the efficiency and accuracy of error level value identification.
[0067] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0068] It should be noted that the acquisition module 21, the first determination module 22, the second determination module 23, the third determination module 24, and the fourth determination module 25 correspond to steps S102 to S110 in the embodiment, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the modules as part of the device can be run in a computer terminal.
[0069] It should be noted that the optional or preferred implementation of this embodiment can refer to the relevant description in the embodiment, which will not be repeated here.
[0070] The above-mentioned error level value identification device may also include a processor and a memory, and the acquisition module 21, the first determination module 22, the second determination module 23, the third determination module 24, the fourth determination module 25, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.
[0071] The processor includes a kernel, which retrieves the corresponding program unit from the memory. There can be one or more kernels. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0072] An embodiment of the present invention provides a non-volatile storage medium on which a program is stored. When the program is executed by a processor, an error level value recognition method is implemented.
[0073] like Figure 3 As shown, an embodiment of the present invention provides an electronic device, the electronic device 10 includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: the memory is used to store a computer program, wherein when the computer program is executed by the processor, the processor implements the above-mentioned error level value identification method. The device in this article may be a server, a PC, etc.
[0074] The present invention also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: computer instructions are executed by a processor to perform the above-mentioned error level value identification method.
[0075] 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.
[0076] 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 produce 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.
[0077] 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.
[0078] 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.
[0079] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0080] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0081] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0082] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0083] It should be understood by those skilled in the art that the 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 aspects. Moreover, 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.
[0084] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A method for identifying an error level value, characterized in that: include: Acquire a set of level values corresponding to time interval one and time interval two, wherein the time interval one and the time interval two are two adjacent time periods when the Hall transmitter senses the level value; In the level value set corresponding to the time interval one, determining an average of the level values located in a predetermined interval as a first average; determining, according to the first average, whether the level value set of the second time interval includes a target level value; If the level value set of the second time interval does not include the target level value, determining a useful mean of the level value set of the second time interval; According to the useful mean of the time interval two, it is determined whether there is an erroneous level value in the level value set of the time interval two.
2. The method according to claim 1, characterized in that Determining, in the level value set corresponding to the time interval one, an average of the level values within a predetermined interval as a first average, comprises: Determine, from the level value set corresponding to the time interval, a plurality of level values within the predetermined interval; An average of the plurality of level values in the predetermined interval is calculated as the first average.
3. The method according to claim 1, characterized in that Determining, according to the first average, whether the level value set of the second time interval includes a target level value includes: Determining a target interval including the first average according to the first average; If there is no level value in the target interval in the level value set of the second time interval, the second time interval does not include the target level value.
4. The method according to claim 1, characterized in that: If the level value set of the second time interval does not include the target level value, determining the useful mean of the second time interval includes: The highest level value and the lowest level value in the second time interval are removed to obtain a remaining level value; The average of the remaining level values is calculated as a second average, and the second average is used as a useful average of the second time interval.
5. The method according to claim 1, characterized in that Determining whether there is an error level value in the level value set of the time interval two according to the useful mean of the time interval two includes: Determining whether the useful mean is within a predetermined range; If the useful mean of the second time interval is within the predetermined range, it is determined that there is no erroneous level value in the level value set of the second time interval; If the useful mean of the time interval two is not within the predetermined range, it is determined that an erroneous level value exists in the level value set of the time interval two.
6. The method according to claim 5, characterized in that If the useful mean of the second time interval is not within the predetermined range, determining that there is an error level value in the level value set of the second time interval includes: Subtract each level value in the level value set of the second time interval from the first average value to obtain a plurality of difference values; When there is a difference whose absolute value is lower than the target critical value among the plurality of difference values, determining that there is no error level value in the level value set of the second time interval; In the case that the absolute values of the plurality of differences are all higher than the target critical value, the level values corresponding to the differences whose absolute values are higher than the target critical value are used as the error level values in the second time interval.
7. An error level value identification device, characterized in that: include: An acquisition module, used to acquire a set of level values corresponding to a time interval 1 and a time interval 2, respectively, wherein the time interval 1 and the time interval 2 are two adjacent time periods when the Hall transmitter senses the level value; A first determining module, configured to determine, in the level value set corresponding to the time interval one, an average of level values within a predetermined interval as a first average; a second determining module, configured to determine, according to the first average, whether the level value set of the second time interval includes a target level value; A third determining module, configured to determine a useful mean of the level value set of the time interval two if the level value set of the time interval two does not include the target level value; The fourth determination module is used to determine whether there is an erroneous level value in the level value set of the time interval two according to the useful mean of the time interval two.
8. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the error level value identification method according to any one of claims 1 to 6.
9. An electronic device, characterized in that: include: One or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the error level value identification method described in any one of claims 1 to 6.
10. A computer program product comprising computer instructions, characterized in that: The computer instructions are executed by the processor to implement the error level value identification method according to any one of claims 1 to 6.