Metering method of double-magnetic-resistance water meter
Through the metering method of a dual magnetoresistive water meter, using self-comparison mechanism and real-time monitoring of magnetoresistive state changes, the existing three magnetoresistive water meter has been solved, and the problem of high cost and inconsistency in the electromechanical state is achieved, achieving higher metrological accuracy and reliability.
Patent Information
- Application Number
- CN202510225499.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-05-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing three-magnetic reluctance water meter has large measurement errors and poor accuracy and reliability due to its large volume, high installation difficulty, high cost and inconsistent electromechanical factors.
Using the metering method of a double magnetoresistive water meter, through the design of the center angle of the circle composed of two magnetoresistive and magnetic pointers is less than 90 degrees, the pre-recorded magnetoresistive state sequence is used to determine the number of forward and inversion times, and the changes in magnetoresistive state are monitored in real time.
It reduces the cost of water meter, avoids the problem of electromechanical inconsistency, improves the accuracy and reliability of metering, and ensures that high metering accuracy can be maintained in complex environments.
Smart Images

Figure CN120027867A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of water meter measurement, and in particular to a measurement method of a double magnetic resistance water meter. Background Art
[0002] With the acceleration of urbanization and the increase in demand for water resource management, smart water meters, as an important part of the water management system, have gradually been widely used. Currently, most common smart water meters on the market use three magnetic resistors to measure water flow. This design usually evenly distributes the three magnetic resistors within a 360-degree range to achieve accurate measurement of water flow.
[0003] However, the existing three-magnetic resistance water meter needs to arrange three magnetic resistances within a 360-degree range, which makes the entire water meter larger, increases the difficulty and cost of installation, and increases the manufacturing cost. At the same time, the existing three-magnetic resistance water meter often encounters the problem of electromechanical inconsistency in practical applications, that is, the signal transmission between the mechanical part (such as the impeller) and the electronic part (such as the magnetic resistance) is not synchronized or distorted, resulting in large metering errors and poor accuracy and reliability of the water meter. Summary of the invention
[0004] In view of this, the present invention provides a metering method for a double magnetic resistance water meter to solve the problems of high cost of the existing three-magnetic resistance water meter and poor metering accuracy caused by electromechanical inconsistency during the metering process.
[0005] In a first aspect, the present invention provides a measurement method of a dual magnetic resistance water meter, the dual magnetic resistance water meter comprising two magnetic resistances and a magnetic pointer, the two magnetic resistances being located in a circle with the magnetic pointer as the center, and the center angle formed by the two magnetic resistances and the magnetic pointer being less than 90 degrees;
[0006] The method includes:
[0007] Based on multiple initial matching states of the two magnetic resistors and the magnetic pointer, the magnetic pointer is rotated forward for one circle, and a first magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored; the magnetic pointer is reversed for one circle, and a second magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored. The magnetic resistor state sequence indicates the change of the influence of the magnetic pointer on the magnetic resistor state of the two magnetic resistors during the rotation process, and the magnetic resistor state indicates that the magnetic resistor is in a high resistance state or a low resistance state;
[0008] When a rising edge or a falling edge is detected in any magnetic resistance, the rotational magnetic resistance states of the two magnetic resistances are stored, and the number of storage times is accumulated;
[0009] When the number of storage times reaches a preset number, a self-comparison is performed based on the rotational magnetic resistance state of the two magnetic resistances, the first magnetic resistance state sequence, and the second magnetic resistance state sequence to determine the number of forward rotations and the number of reverse rotations of the dual magnetic resistance water meter;
[0010] Clear the stored times, return to the step of storing the rotational magnetic resistance states of the two magnetic resistances when a rising edge or a falling edge is detected on any magnetic resistance, accumulating the stored times, accumulating the forward rotation times and the reverse rotation times until the metering process is completed, and obtaining the target forward rotation times and the target reverse rotation times;
[0011] Water usage is metered based on target forward and reverse rotation times.
[0012] The metering method of the dual magnetic resistance water meter provided in the embodiment of the present invention establishes a standard reference by pre-recording the magnetic resistance state sequence during forward rotation and reverse rotation, so that the subsequent self-comparison process has a basis to rely on, thereby improving the accuracy and reliability of metering, and monitoring the changes in the magnetic resistance state in real time, so as to more accurately record the state changes of the two magnetic resistances when the magnetic pointer rotates. Through the self-comparison mechanism, after storing a preset number of data, the current forward and reverse rotation times are automatically adjusted and confirmed, reducing the influence of external interference, ensuring that a high metering accuracy can be maintained even in complex environments, clearing the stored times after one counting and restarting monitoring, and gradually accumulating the forward and reverse rotation times, which can ensure the continuity and accuracy of the entire metering process, and finally obtaining reliable target forward rotation times and target reverse rotation times, based on which the actual water consumption is calculated, and by using the dual magnetic resistance water meter for metering, the cost is reduced compared to the three-magnetic resistance water meter, and electromechanical inconsistencies can be avoided during the metering process, effectively improving the metering accuracy and reliability.
[0013] In an optional implementation, when the number of storage times reaches a preset number, a self-comparison is performed based on the rotational magnetic resistance state of the two magnetic resistances, the first magnetic resistance state sequence, and the second magnetic resistance state sequence to determine the number of forward rotations and the number of reverse rotations of the dual magnetic resistance water meter, including:
[0014] The preset number of rotational reluctance states are arranged in the order of storage time from earliest to latest to form a target reluctance state sequence;
[0015] Determining whether the target magnetoresistance state sequence conforms to a first magnetoresistance state sequence or a second magnetoresistance state sequence corresponding to any initial matching state;
[0016] When the target magnetic resistance state sequence meets the first magnetic resistance state sequence corresponding to any initial matching state, the number of forward rotations is accumulated;
[0017] When the target magnetoresistance state sequence matches the second magnetoresistance state sequence corresponding to any initial matching state, the number of inversions is accumulated.
[0018] The metering method of the dual magnetic resistance water meter provided in the embodiment of the present invention arranges the stored magnetic resistance states in order of storage time to form a target magnetic resistance state sequence, and compares it with a pre-recorded standard state sequence. It can quickly identify whether over- or under-counting occurs, thereby obtaining accurate forward and reverse rotation times, avoiding electromechanical inconsistencies, reducing the possibility of misjudgment, and providing a complete data basis for the final water use metering.
[0019] In an optional implementation, after determining whether the target magnetoresistance state sequence conforms to the first magnetoresistance state sequence or the second magnetoresistance state sequence corresponding to any initial matching state, the method further includes:
[0020] When the target reluctance state sequence does not conform to the first reluctance state sequence or the second reluctance state sequence corresponding to any initial matching state, determining whether there is a rotational reluctance state consistent with the first rotational reluctance state in the target reluctance state sequence;
[0021] determining a first target position of the rotating reluctance state in the sequence of target reluctance states when a rotating reluctance state that is consistent with the first rotating reluctance state exists;
[0022] The first rotational reluctance state is retained, the rotational reluctance state located after the first target position is sequentially assigned to the rotational reluctance state located after the first rotational reluctance state, and all rotational reluctance states except the first rotational reluctance state and the assigned rotational reluctance state in the target reluctance state sequence are cleared;
[0023] The storage times are modified to the number of rotational reluctance states in the target reluctance state sequence, and the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times is returned to when a rising edge or a falling edge is detected in any reluctance.
[0024] The metering method of the dual magnetic resistance water meter provided by the embodiment of the present invention determines whether there is a state consistent with the first rotating magnetic resistance state in the target magnetic resistance state sequence, identifies possible repeated or abnormal states, finds the first target position consistent with the first rotating magnetic resistance state, provides a basis for subsequent data correction, retains the first rotating magnetic resistance state, and assigns the rotating magnetic resistance state after the first target position to the rotating magnetic resistance state after the first rotating magnetic resistance state in sequence, clears redundant data, retains only valid rotating magnetic resistance states, corrects the storage times to re-store the magnetic resistance changes of the two magnetic resistances, and ensures that the final metering result is more accurate and reliable.
[0025] In an optional implementation, after determining whether there is a rotating reluctance state consistent with the first rotating reluctance state in the target reluctance state sequence, the method further includes:
[0026] When there is no rotational reluctance state that is consistent with the first rotational reluctance state, determining whether there is a rotational reluctance state that is consistent with the second rotational reluctance state in the target reluctance state sequence;
[0027] determining a second target position of the rotational reluctance state in the sequence of target reluctance states when a rotational reluctance state that is consistent with the second rotational reluctance state exists;
[0028] The first rotational reluctance state and the second rotational reluctance state are retained, the rotational reluctance state located after the second target position is sequentially assigned to the rotational reluctance state located after the second rotational reluctance state, and all rotational reluctance states except the first rotational reluctance state, the second rotational reluctance state and the assigned rotational reluctance state in the target reluctance state sequence are cleared;
[0029] The storage times are modified to the number of rotational reluctance states in the target reluctance state sequence, and the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times is returned to when a rising edge or a falling edge is detected in any reluctance.
[0030] The metering method of the dual magnetic resistance water meter provided by the embodiment of the present invention determines whether there is a state consistent with the second rotating magnetic resistance state in the target magnetic resistance state sequence, identifies possible repeated or abnormal states, and finds the second target position consistent with the second rotating magnetic resistance state, thereby providing a basis for subsequent data correction, retaining the first and second rotating magnetic resistance states, and assigning the rotating magnetic resistance state after the second target position to the rotating magnetic resistance state after the second rotating magnetic resistance state in sequence, clearing redundant data, retaining only valid rotating magnetic resistance states, correcting the storage times to re-store the magnetic resistance changes of the two magnetic resistances, and ensuring that the final metering result is more accurate and reliable.
[0031] In an optional implementation, after determining whether there is a rotational reluctance state consistent with the second rotational reluctance state in the target reluctance state sequence, the method further includes:
[0032] When there is no rotational reluctance state that is consistent with the second rotational reluctance state, determining whether there is a rotational reluctance state that is consistent with the third rotational reluctance state in the target reluctance state sequence;
[0033] When there is a rotational reluctance state that is consistent with the third rotational reluctance state, determining a third target position of the rotational reluctance state in the target reluctance state sequence;
[0034] retaining the first rotational reluctance state, the second rotational reluctance state, and the third rotational reluctance state, assigning the rotational reluctance state after the third target position to the rotational reluctance state after the third rotational reluctance state in sequence, and clearing all rotational reluctance states in the target reluctance state sequence except the first rotational reluctance state, the second rotational reluctance state, the third rotational reluctance state, and the assigned rotational reluctance state;
[0035] The storage times are modified to the number of rotational reluctance states in the target reluctance state sequence, and the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times is returned to when a rising edge or a falling edge is detected in any reluctance.
[0036] The metering method of the dual magnetic resistance water meter provided by the embodiment of the present invention determines whether there is a state consistent with the third rotating magnetic resistance state in the target magnetic resistance state sequence, identifies possible repeated or abnormal states, and finds the third target position consistent with the third rotating magnetic resistance state, thereby providing a basis for subsequent data correction, retaining the first, second and third rotating magnetic resistance states, and assigning the rotating magnetic resistance state after the third target position to the rotating magnetic resistance state after the third rotating magnetic resistance state in sequence, clearing redundant data, retaining only valid rotating magnetic resistance states, correcting the storage times to re-store the magnetic resistance changes of the two magnetic resistances, and ensuring that the final metering result is more accurate and reliable.
[0037] In an optional implementation, after determining whether there is a rotational reluctance state consistent with the third rotational reluctance state in the target reluctance state sequence, the method further includes:
[0038] When there is no rotational reluctance state that is consistent with the third rotational reluctance state, determining whether there is a rotational reluctance state that is consistent with the fourth rotational reluctance state in the target reluctance state sequence;
[0039] When there is a rotational reluctance state that is consistent with the fourth rotational reluctance state, retain the first rotational reluctance state, the second rotational reluctance state, the third rotational reluctance state, and the fourth rotational reluctance state, and clear the last rotational reluctance state in the target reluctance state sequence;
[0040] The storage times are modified to the number of rotational reluctance states in the target reluctance state sequence, and the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times is returned to when a rising edge or a falling edge is detected in any reluctance.
[0041] The metering method of the dual magnetic resistance water meter provided by the embodiment of the present invention determines whether there is a state consistent with the fourth rotating magnetic resistance state in the target magnetic resistance state sequence, identifies possible repeated or abnormal states, retains the first four rotating magnetic resistance states, clears the redundant fifth rotating magnetic resistance state, corrects the storage times to re-store the magnetic resistance changes of the two magnetic resistances, and ensures that the final metering result is more accurate and reliable.
[0042] In an optional embodiment, the initial matching state is that the reluctance states of the two reluctances are respectively a high resistance state and a low resistance state;
[0043] Based on multiple initial matching states of two magnetic resistors and magnetic pointers, the magnetic pointer is rotated forward for one circle, and a first magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored; the magnetic pointer is reversed for one circle, and a second magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, including:
[0044] The magnetic pointer is rotated forward for one circle, and the first magnetic resistance state sequence of the two magnetic resistances is obtained as high resistance state and low resistance state, high resistance state and high resistance state, low resistance state and high resistance state, low resistance state and low resistance state, and high resistance state and low resistance state;
[0045] The magnetic pointer is reversed for one circle, and the second magnetic resistance state sequence of the two magnetic resistances is obtained as high resistance state and low resistance state, low resistance state and low resistance state, low resistance state and high resistance state, high resistance state and high resistance state, and high resistance state and low resistance state.
[0046] The metering method of the dual magnetic resistance water meter provided in an embodiment of the present invention obtains the corresponding first magnetic resistance state sequence and second magnetic resistance state sequence by setting the two magnetic resistances to high resistance state and low resistance state respectively in the initial matching state, and making the magnetic pointer rotate forward one circle and reverse one circle respectively, thereby providing a reference basis for self-comparison.
[0047] In an optional embodiment, the initial matching state is that the reluctance states of the two reluctances are respectively a high resistance state and a high resistance state;
[0048] Based on multiple initial matching states of two magnetic resistors and magnetic pointers, the magnetic pointer is rotated forward for one circle, and a first magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored; the magnetic pointer is reversed for one circle, and a second magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, including:
[0049] The magnetic pointer is rotated forward for one circle, and the first magnetic resistance state sequence of the two magnetic resistances is obtained as high resistance state and high resistance state, low resistance state and high resistance state, low resistance state and low resistance state, high resistance state and low resistance state, and high resistance state and high resistance state;
[0050] The magnetic pointer is reversed for one circle, and the second magnetic resistance state sequence of the two magnetic resistances is obtained as high resistance state and high resistance state, high resistance state and low resistance state, low resistance state and low resistance state, low resistance state and high resistance state, and high resistance state and high resistance state.
[0051] The metering method of the dual magnetic resistance water meter provided in an embodiment of the present invention obtains the corresponding first magnetic resistance state sequence and second magnetic resistance state sequence by setting the two magnetic resistances in the initial matching state to a high resistance state and a high resistance state respectively, and making the magnetic pointer rotate forward one circle and reverse one circle respectively, thereby providing a reference basis for self-comparison.
[0052] In an optional embodiment, the initial matching state is that the reluctance states of the two reluctances are respectively a low resistance state and a high resistance state;
[0053] Based on multiple initial matching states of two magnetic resistors and magnetic pointers, the magnetic pointer is rotated forward for one circle, and a first magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored; the magnetic pointer is reversed for one circle, and a second magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, including:
[0054] The magnetic pointer is rotated forward for one circle, and the first magnetic resistance state sequence of the two magnetic resistances is obtained as low resistance state and high resistance state, low resistance state and low resistance state, high resistance state and low resistance state, high resistance state and high resistance state, and low resistance state and high resistance state;
[0055] The magnetic pointer is reversed for one circle, and the second magnetic resistance state sequence of the two magnetic resistances is obtained as low resistance state and high resistance state, high resistance state and high resistance state, high resistance state and low resistance state, low resistance state and low resistance state, and low resistance state and high resistance state.
[0056] The metering method of the dual magnetic resistance water meter provided in an embodiment of the present invention obtains the corresponding first magnetic resistance state sequence and second magnetic resistance state sequence by setting the two magnetic resistances in the initial matching state to a low resistance state and a high resistance state, respectively, and making the magnetic pointer rotate forward one circle and reverse one circle respectively, thereby providing a reference basis for self-comparison.
[0057] In an optional embodiment, the initial matching state is that the reluctance states of the two reluctances are respectively a low resistance state and a low resistance state;
[0058] Based on multiple initial matching states of two magnetic resistors and magnetic pointers, the magnetic pointer is rotated forward for one circle, and a first magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored; the magnetic pointer is reversed for one circle, and a second magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, including:
[0059] The magnetic pointer is rotated forward for one circle, and the first magnetic resistance state sequence of the two magnetic resistances is obtained as low resistance state and low resistance state, high resistance state and low resistance state, high resistance state and high resistance state, low resistance state and high resistance state, and low resistance state and low resistance state;
[0060] The magnetic pointer is reversed for one circle, and the second magnetic resistance state sequence of the two magnetic resistances is obtained as low resistance state and low resistance state, low resistance state and high resistance state, high resistance state and high resistance state, high resistance state and low resistance state, and low resistance state and low resistance state.
[0061] The metering method of the dual magnetic resistance water meter provided in an embodiment of the present invention obtains the corresponding first magnetic resistance state sequence and second magnetic resistance state sequence by setting the two magnetic resistances in the initial matching state to a low resistance state and a low resistance state respectively, and making the magnetic pointer rotate forward one circle and reverse one circle respectively, thereby providing a reference basis for self-comparison.
[0062] In a second aspect, the present invention provides a metering device for a dual magnetic resistance water meter, the dual magnetic resistance water meter comprising two magnetic resistances and a magnetic pointer, the two magnetic resistances being located in a circle with the magnetic pointer as the center, and the center angle formed by the two magnetic resistances and the magnetic pointer being less than 90 degrees;
[0063] The device includes:
[0064] A first storage module is used to make the magnetic pointer rotate forward one circle based on multiple initial matching states of the two magnetic resistors and the magnetic pointer, store a first magnetic resistance state sequence corresponding to the two magnetic resistors in different initial matching states, make the magnetic pointer rotate backward one circle, and store a second magnetic resistance state sequence corresponding to the two magnetic resistors in different initial matching states, the magnetic resistance state sequence represents the change of the influence of the magnetic pointer on the magnetic resistance state of the two magnetic resistors during the rotation process, and the magnetic resistance state represents that the magnetic resistance is in a high resistance state or a low resistance state;
[0065] A detection module, used for storing the rotational magnetic resistance states of the two magnetic resistances and accumulating the number of storage times when a rising edge or a falling edge is detected in any magnetic resistance;
[0066] A first determination module is used to determine the number of forward rotations and the number of reverse rotations of the dual magnetic resistance water meter by performing self-comparison based on the rotational magnetic resistance states of the two magnetic resistances, the first magnetic resistance state sequence, and the second magnetic resistance state sequence when the number of storage times reaches a preset number;
[0067] A counting module is used to clear the stored times, return to the step of storing the rotational magnetic resistance states of the two magnetic resistances when a rising edge or a falling edge is detected on any magnetic resistance, accumulate the stored times, accumulate the forward rotation times and the reverse rotation times, until the metering process is completed, and obtain the target forward rotation times and the target reverse rotation times;
[0068] The metering module is used to measure water consumption based on a target number of forward rotations and a target number of reverse rotations.
[0069] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the metering method of the dual magnetic resistance water meter of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0070] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the metering method for a dual magnetic resistance water meter according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0072] Figure 1 is a schematic diagram of a dual magnetic resistance meter according to an embodiment of the present invention;
[0073] Figure 2 is a flow chart of a metering method of a dual magnetic resistance water meter according to an embodiment of the present invention;
[0074] Figure 3 is a structural block diagram of a metering device of a double magnetic resistance water meter according to an embodiment of the present invention;
[0075] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0076] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0077] The existing three-magnetic resistance water meter needs to arrange three magnetic resistances within a 360-degree range, which results in a larger volume of the entire water meter, increasing the difficulty and cost of installation, and also increasing the manufacturing cost. In addition, the problem of electromechanical inconsistency occurs during metering, resulting in large metering errors and poor accuracy and reliability of the water meter. The metering method of the dual magnetic resistance water meter provided in the embodiment of the present invention reduces the cost compared to the three-magnetic resistance water meter by using the dual magnetic resistance water meter for metering, and can avoid electromechanical inconsistency during the metering process, effectively improving the metering accuracy and reliability.
[0078] According to an embodiment of the present invention, a metering method embodiment of a dual magnetic resistance water meter 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.
[0079] Figure 1 is a schematic diagram of a dual magnetic resistance meter according to an embodiment of the present invention. The dual magnetic resistance water meter includes two magnetic resistances and a magnetic pointer. The two magnetic resistances are located in a circle with the magnetic pointer as the center, and the central angle formed by the two magnetic resistances and the magnetic pointer is less than 90 degrees.
[0080] In this embodiment, a measurement method of a dual magnetic resistance water meter is provided. Figure 2 is a flow chart of a metering method of a dual magnetic resistance water meter according to an embodiment of the present invention, such as Figure 2 As shown, the process includes the following steps:
[0081] Step S201, based on multiple initial matching states of the two magnetic resistors and the magnetic pointer, the magnetic pointer is rotated forward one circle, and a first magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored; the magnetic pointer is reversed one circle, and a second magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored. The magnetic resistor state sequence represents the change in the influence of the magnetic pointer on the magnetic resistor state of the two magnetic resistors during the rotation process, and the magnetic resistor state represents whether the magnetic resistor is in a high resistance state or a low resistance state.
[0082] Specifically, since the position of the magnetic pointer in the dual magnetic resistance water meter is not fixed, different initial matching states may appear when the two magnetic resistances match the magnetic pointer for the first time when the metering starts. The high resistance state is represented by "1" and the low resistance state is represented by "0", and the initial matching states of the above two magnetic resistances can be obtained as follows: 10, 11, 01, 00. Among them, the high resistance state "1" indicates that the resistance of the magnetic resistance is high, the magnetic field is weak or inconsistent with the rotation direction of the magnetic pointer; the low resistance state "0" indicates that the resistance of the magnetic resistance is low, the magnetic field is strong and consistent with the rotation direction of the magnetic pointer. Taking the above four initial matching states as preconditions, the magnetic pointer is rotated forward or reversed one circle to obtain the first magnetic resistance state sequence and the second magnetic resistance state sequence of the two magnetic resistances. By judging the forward and reverse rotation in the four initial matching states, the electromechanical inconsistency problem caused by the first matching of the magnetic resistance and the magnetic pointer can be prevented, and omissions can be prevented, thereby improving the metering accuracy.
[0083] Step S202, when a rising edge or a falling edge is detected in any magnetic resistance, the rotational magnetic resistance states of the two magnetic resistances are stored and the number of storage times is accumulated.
[0084] Specifically, two magnetic resistors are connected to a single-chip microcomputer, and the single-chip microcomputer software configures an external interrupt bilateral trigger. When a rising edge (from a low resistance state to a high resistance state) or a falling edge (from a high resistance state to a low resistance state) of any magnetic resistor is detected, the rotational magnetic resistance state of the two magnetic resistors at this time is stored, and the number of storages is accumulated each time the storage is performed, thereby accurately recording the change in the magnetic resistance state.
[0085] Step S203, when the storage times reach the preset number, a self-comparison is performed based on the rotational magnetic resistance states of the two magnetic resistances, the first magnetic resistance state sequence and the second magnetic resistance state sequence to determine the forward rotation times and reverse rotation times of the dual magnetic resistance water meter.
[0086] Specifically, the preset number is determined based on the number of magnetic resistances in the water meter. Since the embodiment of the present invention adopts a dual magnetic resistance water meter, the two magnetic resistances only exist in a high resistance state or a low resistance state during the rotation of the magnetic pointer, that is, the two magnetic resistances will experience 4 states in a complete rotation cycle: 10, 11, 01, 00. Therefore, the preset number can be set to 5, which can ensure that at least one complete rotation cycle is covered, and there is a certain redundancy to deal with possible abnormal state changes. When the two magnetic resistances undergo 5 state changes, these 5 state changes are self-compared with the first magnetic resistance state sequence and the second magnetic resistance state sequence obtained in step S201, thereby avoiding the problem of electromechanical inconsistency and accurately determining the number of forward rotations and reverse rotations of the water meter.
[0087] Step S204, clear the stored times, return to the step of storing the rotational magnetic resistance states of the two magnetic resistances when a rising edge or a falling edge is detected in any magnetic resistance, and accumulate the stored times, accumulate the number of forward rotations and the number of reverse rotations, until the metering process is completed to obtain the target forward rotation times and the target reverse rotation times.
[0088] Specifically, since there may be multiple rotations of the magnetic pointer in one metering process, the state changes of the two magnetic resistances are continuously recorded during the rotation of the magnetic pointer, so that the target forward rotation number and target reverse rotation number of the dual magnetic resistance water meter in the entire metering process can be accurately determined based on this.
[0089] Step S205, water consumption is measured based on the target number of forward rotations and the target number of reverse rotations.
[0090] Specifically, the number of forward rotations usually represents normal water consumption, and the number of reverse rotations may require special processing (such as ignoring or recording abnormal situations). Water consumption is measured based on the target number of forward rotations and the target number of reverse rotations, thereby improving measurement accuracy.
[0091] The metering method of the dual magnetic resistance water meter provided in the embodiment of the present invention establishes a standard reference by pre-recording the magnetic resistance state sequence during forward rotation and reverse rotation, so that the subsequent self-comparison process has a basis to rely on, thereby improving the accuracy and reliability of metering, and monitoring the changes in the magnetic resistance state in real time, so as to more accurately record the state changes of the two magnetic resistances when the magnetic pointer rotates. Through the self-comparison mechanism, after storing a preset number of data, the current forward and reverse rotation times are automatically adjusted and confirmed, reducing the influence of external interference, ensuring that a high metering accuracy can be maintained even in complex environments, clearing the stored times after one counting and restarting monitoring, and gradually accumulating the forward and reverse rotation times, which can ensure the continuity and accuracy of the entire metering process, and finally obtaining reliable target forward rotation times and target reverse rotation times, based on which the actual water consumption is calculated, and by using the dual magnetic resistance water meter for metering, the cost is reduced compared to the three-magnetic resistance water meter, and electromechanical inconsistencies can be avoided during the metering process, effectively improving the metering accuracy and reliability.
[0092] In this embodiment, a measurement method of a dual magnetic resistance water meter is provided, and the method specifically comprises the following steps:
[0093] Step S301, based on multiple initial matching states of the two magnetic resistors and the magnetic pointer, the magnetic pointer is rotated forward one circle, and a first magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored; the magnetic pointer is reversed one circle, and a second magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored. The magnetic resistor state sequence represents the change in the influence of the magnetic pointer on the magnetic resistor state of the two magnetic resistors during the rotation process, and the magnetic resistor state represents whether the magnetic resistor is in a high resistance state or a low resistance state.
[0094] Specifically, the above step S301 includes:
[0095] In some optional implementations, when the initial matching state is that the reluctance states of the two reluctances are respectively a high resistance state and a low resistance state, the first reluctance state sequence and the second reluctance state sequence are determined through step S3011 and step S3012.
[0096] Step S3011, make the magnetic pointer rotate forward one circle, and obtain the first magnetic resistance state sequence of the two magnetic resistances: high resistance state and low resistance state, high resistance state and high resistance state, low resistance state and high resistance state, low resistance state and low resistance state, and high resistance state and low resistance state.
[0097] Specifically, when the initial matching state is "10", during one positive rotation of the magnetic pointer, the change in the magnetic field causes the two magnetic resistances to change state, thereby obtaining a first magnetic resistance state sequence of: 10, 11, 01, 00, 10.
[0098] Step S3012, reverse the magnetic pointer by one circle, and obtain a second magnetic resistance state sequence of the two magnetic resistors: high resistance state and low resistance state, low resistance state and low resistance state, low resistance state and high resistance state, high resistance state and high resistance state, and high resistance state and low resistance state.
[0099] Specifically, when the initial matching state is "10", during one reversal of the magnetic pointer, the change in the magnetic field is different from that in the forward rotation, so the magnetic resistance state needs to be re-recorded to obtain the second magnetic resistance state sequence: 10, 00, 01, 11, 10.
[0100] In some optional implementations, when the initial matching state is that the magnetoresistance states of the two magnetoresistances are respectively high resistance state and high resistance state, the first magnetoresistance state sequence and the second magnetoresistance state sequence are determined through step S3013 and step S3014.
[0101] Step S3013, make the magnetic pointer rotate forward one circle, and obtain the first magnetic resistance state sequence of the two magnetic resistances: high resistance state and high resistance state, low resistance state and high resistance state, low resistance state and low resistance state, high resistance state and low resistance state, and high resistance state and high resistance state.
[0102] Specifically, when the initial matching state is "11", the first magnetic resistance state sequence in the forward rotation condition is: 11, 01, 00, 10, 11.
[0103] Step S3014, the magnetic pointer is reversed for one circle, and the second magnetic resistance state sequence of the two magnetic resistors is obtained as high resistance state and high resistance state, high resistance state and low resistance state, low resistance state and low resistance state, low resistance state and high resistance state, and high resistance state and high resistance state.
[0104] Specifically, when the initial matching state is "11", the second magnetoresistance state sequence under the inversion condition is: 11, 10, 00, 01, 11.
[0105] In some optional implementations, when the initial matching state is that the reluctance states of the two reluctances are respectively a low resistance state and a high resistance state, the first reluctance state sequence and the second reluctance state sequence are determined through step S3015 and step S3016.
[0106] Step S3015, make the magnetic pointer rotate forward one circle, and obtain the first magnetic resistance state sequence of the two magnetic resistances: low resistance state and high resistance state, low resistance state and low resistance state, high resistance state and low resistance state, high resistance state and high resistance state, and low resistance state and high resistance state.
[0107] Specifically, when the initial matching state is "01", the first magnetic resistance state sequence in the forward rotation condition is: 01, 00, 10, 11, 01.
[0108] Step S3016, reverse the magnetic pointer by one circle, and obtain a second magnetic resistance state sequence of the two magnetic resistors: low resistance state and high resistance state, high resistance state and high resistance state, high resistance state and low resistance state, low resistance state and low resistance state, and low resistance state and high resistance state.
[0109] Specifically, when the initial matching state is "01", the second magnetoresistance state sequence under the inversion condition is: 01, 11, 10, 00, 01.
[0110] In some optional embodiments, when the initial matching state is that the reluctance states of the two reluctances are respectively low resistance state and low resistance state, the first reluctance state sequence and the second reluctance state sequence are determined through step S3017 and step S3018.
[0111] Step S3017, make the magnetic pointer rotate forward one circle, and obtain the first magnetic resistance state sequence of the two magnetic resistances: low resistance state and low resistance state, high resistance state and low resistance state, high resistance state and high resistance state, low resistance state and high resistance state, and low resistance state and low resistance state.
[0112] Specifically, when the initial matching state is "00", the first magnetic resistance state sequence in the forward rotation condition is: 00, 10, 11, 01, 00.
[0113] Step S3018, reverse the magnetic pointer by one circle, and obtain the second magnetic resistance state sequence of the two magnetic resistances: low resistance state and low resistance state, low resistance state and high resistance state, high resistance state and high resistance state, high resistance state and low resistance state, and low resistance state and low resistance state.
[0114] Specifically, when the initial matching state is "00", the second magnetoresistance state sequence under the inversion condition is: 00, 01, 11, 10, 00.
[0115] Step S302: When a rising edge or falling edge is detected in any magnetic resistance, the rotational magnetic resistance states of the two magnetic resistances are stored and the number of storage times is accumulated. Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.
[0116] Step S303, when the storage times reach the preset number, a self-comparison is performed based on the rotational magnetic resistance state of the two magnetic resistances, the first magnetic resistance state sequence and the second magnetic resistance state sequence to determine the forward rotation times and reverse rotation times of the dual magnetic resistance water meter.
[0117] Specifically, the above step S303 includes:
[0118] Step S3031 , forming a target reluctance state sequence by arranging a preset number of rotational reluctance states in the order of storage time from earliest to latest.
[0119] Specifically, assuming that the preset number is 5, the 5 rotational reluctance states stored in step S302 are arranged in order of storage time from earliest to latest, to obtain a target reluctance state sequence.
[0120] Step S3032 , determining whether the target magnetoresistance state sequence conforms to the first magnetoresistance state sequence or the second magnetoresistance state sequence corresponding to any initial matching state.
[0121] Specifically, in the above step S301, four first magnetic resistance state sequences corresponding to the four initial matching states in the forward rotation case and four second magnetic resistance state sequences corresponding to the reverse rotation case are obtained. These eight magnetic resistance state sequences are used as a reference basis and are self-compared with the target magnetic resistance state sequence obtained by actual measurement. If any of the above magnetic resistance state sequences is satisfied in the actual metering process, it means that the dual magnetic resistance water meter has completed one forward rotation count or one reverse rotation count.
[0122] Step S3033: when the target magnetic resistance state sequence matches the first magnetic resistance state sequence corresponding to any initial matching state, the number of forward rotations is accumulated.
[0123] Specifically, when the target magnetic resistance state sequence conforms to any of the first magnetic resistance state sequences in the above step S301, it is considered that one forward rotation count is completed, and the number of forward rotations is accumulated.
[0124] Step S3034, when the target magnetoresistance state sequence matches the second magnetoresistance state sequence corresponding to any initial matching state, the number of inversions is accumulated.
[0125] Specifically, when the target magnetoresistance state sequence conforms to any second magnetoresistance state sequence in the above step S301, it is considered that one reversal count is completed, and the number of reversals is accumulated.
[0126] Step S3035 , when the target reluctance state sequence does not conform to the first reluctance state sequence or the second reluctance state sequence corresponding to any initial matching state, it is determined whether there is a rotational reluctance state consistent with the first rotational reluctance state in the target reluctance state sequence.
[0127] Specifically, when the target magnetic resistance state sequence does not conform to the above eight magnetic resistance state sequences, disturbances such as turbulence and water hammer may occur, causing the water meter to over-count or under-count. If the target magnetic resistance state sequence is not processed accordingly and counting is performed directly, electromechanical inconsistency will occur, thereby affecting the measurement accuracy. Therefore, the embodiment of the present invention clarifies the storage and processing process of the target magnetic resistance state sequence through steps S3035 to S30319, eliminates the influence of interference on counting, and avoids the above problems. First, determine whether there is a rotating magnetic resistance state that is consistent with the first rotating magnetic resistance state in the target magnetic resistance state sequence.
[0128] Step S3036, when there is a rotational reluctance state that is consistent with the first rotational reluctance state, determine the first target position of the rotational reluctance state in the target reluctance state sequence.
[0129] Specifically, when the target magnetic resistance state sequence does not satisfy any of the magnetic resistance state sequences in step S301, when there is a rotational magnetic resistance state consistent with the first rotational magnetic resistance state, it indicates that interference may have occurred during the metering process, resulting in the water meter not fully recording a rotation process. At this time, it is necessary to record the first target position of the rotational magnetic resistance state.
[0130] Step S3037, retain the first rotational reluctance state, assign the rotational reluctance state located after the first target position to the rotational reluctance state located after the first rotational reluctance state in sequence, and clear all rotational reluctance states in the target reluctance state sequence except the first rotational reluctance state and the assigned rotational reluctance state.
[0131] Specifically, assuming that the first target position is the third one in the target magnetic resistance state sequence, the first rotational magnetic resistance state is retained, the fourth rotational magnetic resistance state is assigned to the second rotational magnetic resistance state, and the fifth rotational magnetic resistance state is assigned to the third rotational magnetic resistance state. Since the first rotational magnetic resistance state is retained and the second and third rotational magnetic resistance states have been assigned, the fourth and fifth rotational magnetic resistance states need to be cleared.
[0132] Step S3038, modify the storage times to the number of rotational reluctance states in the target reluctance state sequence, and return to the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times when a rising edge or a falling edge is detected in any reluctance.
[0133] Specifically, since the above steps have cleared the redundant rotational reluctance states, the number of rotational reluctance states stored in the target reluctance state sequence is 3 at this time, and the number of storage times is modified to 3, which is less than the preset number 5, so it is necessary to return to step S302 to continue metering.
[0134] Step S3039, when there is no rotational reluctance state consistent with the first rotational reluctance state, determine whether there is a rotational reluctance state consistent with the second rotational reluctance state in the target reluctance state sequence.
[0135] Specifically, in the self-comparison mechanism, the target reluctance state sequence is compared one by one, that is, when there is no rotational reluctance state consistent with the first rotational reluctance state, the second rotational reluctance state is compared.
[0136] Step S30310, when there is a rotational reluctance state that is consistent with the second rotational reluctance state, determine a second target position of the rotational reluctance state in the target reluctance state sequence.
[0137] Specifically, referring to step S3036, a second target position of a rotational reluctance state consistent with the second rotational reluctance state is determined.
[0138] Step S30311, retain the first rotational reluctance state and the second rotational reluctance state, assign the rotational reluctance state located after the second target position to the rotational reluctance state located after the second rotational reluctance state in sequence, and clear all rotational reluctance states in the target reluctance state sequence except the first rotational reluctance state, the second rotational reluctance state and the assigned rotational reluctance state.
[0139] Specifically, assuming that the second target position is the third in the target magnetic resistance state sequence, the first rotational magnetic resistance state and the second rotational magnetic resistance state are retained, the fourth rotational magnetic resistance state is assigned to the third rotational magnetic resistance state, and the fifth rotational magnetic resistance state is assigned to the fourth rotational magnetic resistance state. Since the first rotational magnetic resistance state and the second rotational magnetic resistance state are retained and the third rotational magnetic resistance state and the fourth rotational magnetic resistance state have been assigned, the fifth rotational magnetic resistance state needs to be cleared.
[0140] Step S30312, modify the storage times to the number of rotational reluctance states in the target reluctance state sequence, and return to the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times when a rising edge or a falling edge is detected in any reluctance.
[0141] Specifically, since the above steps have cleared the redundant rotational reluctance states, the number of rotational reluctance states stored in the target reluctance state sequence is 4 at this time, and the number of storage times is modified to 4, which is less than the preset number 5, so it is necessary to return to step S302 to continue metering.
[0142] Step S30313, when there is no rotational reluctance state consistent with the second rotational reluctance state, determine whether there is a rotational reluctance state consistent with the third rotational reluctance state in the target reluctance state sequence.
[0143] Specifically, in the self-comparison mechanism, when there is no rotational reluctance state that is consistent with the second rotational reluctance state, the third rotational reluctance state is continued to be compared.
[0144] Step S30314: when there is a rotational reluctance state that is consistent with the third rotational reluctance state, determine a third target position of the rotational reluctance state in the target reluctance state sequence.
[0145] Specifically, referring to step S3036, a third target position of a rotational reluctance state consistent with the third rotational reluctance state is determined.
[0146] Step S30315, retain the first rotational reluctance state, the second rotational reluctance state and the third rotational reluctance state, assign the rotational reluctance state after the third target position to the rotational reluctance state after the third rotational reluctance state in sequence, and clear all rotational reluctance states in the target reluctance state sequence except the first rotational reluctance state, the second rotational reluctance state, the third rotational reluctance state and the assigned rotational reluctance state.
[0147] Specifically, assuming that the third target position is the fourth in the target magnetic resistance state sequence, the first rotational magnetic resistance state, the second rotational magnetic resistance state and the third rotational magnetic resistance state are retained, and the fifth rotational magnetic resistance state is assigned to the fourth rotational magnetic resistance state. Since the first rotational magnetic resistance state, the second rotational magnetic resistance state and the third rotational magnetic resistance state are retained and the fourth rotational magnetic resistance state has been assigned, the fifth rotational magnetic resistance state needs to be cleared.
[0148] Step S30316, modify the storage times to the number of rotational reluctance states in the target reluctance state sequence, and return to the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times when a rising edge or a falling edge is detected in any reluctance.
[0149] Specifically, since the above steps have cleared the redundant rotational reluctance states, the number of rotational reluctance states stored in the target reluctance state sequence is 4 at this time, and the number of storage times is modified to 4, which is less than the preset number 5, so it is necessary to return to step S302 to continue metering.
[0150] Step S30317, when there is no rotational reluctance state consistent with the third rotational reluctance state, determine whether there is a rotational reluctance state consistent with the fourth rotational reluctance state in the target reluctance state sequence.
[0151] Specifically, in the self-comparison mechanism, when there is no rotational reluctance state that is consistent with the third rotational reluctance state, the fourth rotational reluctance state continues to be compared.
[0152] Step S30318, when there is a rotational reluctance state consistent with the fourth rotational reluctance state, retain the first rotational reluctance state, the second rotational reluctance state, the third rotational reluctance state and the fourth rotational reluctance state, and clear the last rotational reluctance state in the target reluctance state sequence.
[0153] Specifically, since the preset number is 5, that is, there are only 5 rotational reluctance states in the target reluctance state sequence, when there is a rotational reluctance state consistent with the fourth rotational reluctance state, the rotational reluctance state can only be the fifth rotational reluctance state. At this time, the first four rotational reluctance states are retained, and the fifth rotational reluctance state is a redundant state and needs to be cleared.
[0154] Step S30319, modify the storage times to the number of rotational reluctance states in the target reluctance state sequence, and return to the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times when a rising edge or a falling edge is detected in any reluctance.
[0155] Specifically, since the above steps have cleared the redundant rotational reluctance states, the number of rotational reluctance states stored in the target reluctance state sequence is 4 at this time, and the number of storage times is modified to 4, which is less than the preset number 5, so it is necessary to return to step S302 to continue metering.
[0156] Step S304, clear the stored times, return to the step of storing the rotational magnetic resistance state of the two magnetic resistances when a rising edge or a falling edge is detected in any magnetic resistance, and accumulate the stored times, accumulate the forward rotation times and the reverse rotation times until the metering process is completed to obtain the target forward rotation times and the target reverse rotation times.
[0157] Specifically, through the above steps S302 and S303, only when the target magnetic resistance state sequence meets any first magnetic resistance state sequence or any second magnetic resistance state sequence, a forward count or a reverse count is performed, thereby avoiding over-counting or under-counting. After completing a forward count or a reverse count, the current stored count is cleared, and the metering process is repeated back to step S302, so that the target forward count and the target reverse count in the entire metering process can be accurately obtained, so that accurate water metering can be performed based on this.
[0158] Step S305: water consumption is measured based on the target number of forward rotations and the target number of reverse rotations. Figure 2 Step S205 of the illustrated embodiment will not be described in detail here.
[0159] The metering method of the dual magnetic resistance water meter provided in the embodiment of the present invention establishes a standard reference by pre-recording the magnetic resistance state sequence during forward rotation and reverse rotation, so that the subsequent self-comparison process has a basis to rely on, thereby improving the accuracy and reliability of metering, and monitoring the changes in the magnetic resistance state in real time, so as to more accurately record the state changes of the two magnetic resistances when the magnetic pointer rotates. Through the self-comparison mechanism, after storing a preset number of data, the current forward and reverse rotation times are automatically adjusted and confirmed, reducing the influence of external interference, ensuring that a high metering accuracy can be maintained even in complex environments, clearing the stored times after one counting and restarting monitoring, and gradually accumulating the forward and reverse rotation times, which can ensure the continuity and accuracy of the entire metering process, and finally obtaining reliable target forward rotation times and target reverse rotation times, based on which the actual water consumption is calculated, and by using the dual magnetic resistance water meter for metering, the cost is reduced compared to the three-magnetic resistance water meter, and electromechanical inconsistencies can be avoided during the metering process, effectively improving the metering accuracy and reliability.
[0160] In this embodiment, a metering device of a dual magnetic resistance water meter is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. As used below, the term "module" 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.
[0161] This embodiment provides a measuring device of a dual magnetic resistance water meter, such as Figure 3 As shown, including:
[0162] The first storage module 301 is used to make the magnetic pointer rotate forward one circle based on multiple initial matching states of the two magnetic resistors and the magnetic pointer, and store a first magnetic resistance state sequence corresponding to the two magnetic resistors in different initial matching states; make the magnetic pointer rotate backward one circle, and store a second magnetic resistance state sequence corresponding to the two magnetic resistors in different initial matching states; the magnetic resistance state sequence represents the change of the influence of the magnetic pointer on the magnetic resistance state of the two magnetic resistors during the rotation process; and the magnetic resistance state represents whether the magnetic resistance is in a high resistance state or a low resistance state.
[0163] The detection module 302 is used to store the rotational magnetic resistance states of the two magnetic resistances and accumulate the number of storage times when a rising edge or a falling edge is detected in any magnetic resistance.
[0164] The first determination module 303 is used to determine the forward rotation times and reverse rotation times of the dual magnetic resistance water meter by self-comparison based on the rotational magnetic resistance states of the two magnetic resistances, the first magnetic resistance state sequence and the second magnetic resistance state sequence when the storage times reach a preset number.
[0165] The counting module 304 is used to clear the stored times, return to the step of storing the rotational magnetic resistance state of the two magnetic resistances when a rising edge or a falling edge is detected in any magnetic resistance, accumulate the stored times, accumulate the forward rotation times and the reverse rotation times, until the metering process is completed to obtain the target forward rotation times and the target reverse rotation times.
[0166] The metering module 305 is used to measure water consumption based on the target number of forward rotations and the target number of reverse rotations.
[0167] In some optional implementations, the first determining module 303 includes:
[0168] The first determining unit is used to form a target reluctance state sequence by arranging a preset number of rotational reluctance states in the order of storage time from earliest to latest.
[0169] The judging unit is used to judge whether the target magnetoresistance state sequence conforms to the first magnetoresistance state sequence or the second magnetoresistance state sequence corresponding to any initial matching state.
[0170] The first counting unit is used to accumulate the number of forward rotations when the target magnetic resistance state sequence matches the first magnetic resistance state sequence corresponding to any initial matching state.
[0171] The second counting unit is used to accumulate the number of reversal times when the target magnetoresistance state sequence matches the second magnetoresistance state sequence corresponding to any initial matching state.
[0172] In some optional implementations, after the determining unit, the device further includes:
[0173] The first judgment module is used to judge whether there is a rotational reluctance state consistent with the first rotational reluctance state in the target reluctance state sequence when the target reluctance state sequence does not conform to the first reluctance state sequence or the second reluctance state sequence corresponding to any initial matching state.
[0174] The second determination module is used to determine a first target position of the rotating reluctance state in the target reluctance state sequence when there is a rotating reluctance state that is consistent with the first rotating reluctance state.
[0175] The first correction module is used to retain the first rotational reluctance state, assign the rotational reluctance state located after the first target position to the rotational reluctance state located after the first rotational reluctance state in sequence, and clear all rotational reluctance states in the target reluctance state sequence except the first rotational reluctance state and the assigned rotational reluctance state.
[0176] The second storage module is used to modify the storage times to the number of rotational reluctance states in the target reluctance state sequence, and return to the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times when a rising edge or a falling edge is detected in any reluctance.
[0177] In some optional implementations, after the first determination module, the device further includes:
[0178] The second judgment module is used to judge whether there is a rotating reluctance state consistent with the second rotating reluctance state in the target reluctance state sequence when there is no rotating reluctance state consistent with the first rotating reluctance state.
[0179] The third determination module is used to determine a second target position of the rotating reluctance state in the target reluctance state sequence when there is a rotating reluctance state that is consistent with the second rotating reluctance state.
[0180] The second correction module is used to retain the first rotational reluctance state and the second rotational reluctance state, assign the rotational reluctance state located after the second target position to the rotational reluctance state located after the second rotational reluctance state in sequence, and clear all rotational reluctance states in the target reluctance state sequence except the first rotational reluctance state, the second rotational reluctance state and the assigned rotational reluctance state.
[0181] The third storage module is used to modify the storage times to the number of rotational magnetic resistance states in the target magnetic resistance state sequence, and return to the step of storing the rotational magnetic resistance states of the two magnetic resistances and accumulating the storage times when a rising edge or a falling edge is detected in any magnetic resistance.
[0182] In some optional implementations, after the second determination module, the device further includes:
[0183] The third judgment module is used to judge whether there is a rotational reluctance state consistent with the third rotational reluctance state in the target reluctance state sequence when there is no rotational reluctance state consistent with the second rotational reluctance state.
[0184] The fourth determination module is used to determine a third target position of the rotational reluctance state in the target reluctance state sequence when there is a rotational reluctance state that is consistent with the third rotational reluctance state.
[0185] The third correction module is used to retain the first rotational reluctance state, the second rotational reluctance state and the third rotational reluctance state, and to assign the rotational reluctance state after the third target position to the rotational reluctance state after the third rotational reluctance state in sequence, and to clear all rotational reluctance states in the target reluctance state sequence except the first rotational reluctance state, the second rotational reluctance state, the third rotational reluctance state and the assigned rotational reluctance state.
[0186] The fourth storage module is used to modify the storage times to the number of rotational magnetic resistance states in the target magnetic resistance state sequence, and return to the step of storing the rotational magnetic resistance states of the two magnetic resistances and accumulating the storage times when a rising edge or a falling edge is detected in any magnetic resistance.
[0187] In some optional implementations, after the third determination module, the device further includes:
[0188] The fourth judgment module is used to judge whether there is a rotational reluctance state consistent with the fourth rotational reluctance state in the target reluctance state sequence when there is no rotational reluctance state consistent with the third rotational reluctance state.
[0189] The fourth correction module is used to retain the first rotational reluctance state, the second rotational reluctance state, the third rotational reluctance state and the fourth rotational reluctance state when there is a rotational reluctance state consistent with the fourth rotational reluctance state, and clear the last rotational reluctance state in the target reluctance state sequence.
[0190] The fifth storage module is used to modify the storage times to the number of rotational magnetic resistance states in the target magnetic resistance state sequence, and return to the step of storing the rotational magnetic resistance states of the two magnetic resistances and accumulating the storage times when a rising edge or a falling edge is detected in any magnetic resistance.
[0191] In some optional embodiments, the initial matching state is that the reluctance states of the two reluctances are respectively a high resistance state and a low resistance state;
[0192] The first storage module 301 includes:
[0193] The second determination unit is used to make the magnetic pointer rotate forward one circle to obtain a first magnetic resistance state sequence of two magnetic resistances, which is high resistance state and low resistance state, high resistance state and high resistance state, low resistance state and high resistance state, low resistance state and low resistance state, and high resistance state and low resistance state.
[0194] The third determination unit is used to reverse the magnetic pointer by one circle to obtain a second magnetic resistance state sequence of the two magnetic resistances, which is high resistance state and low resistance state, low resistance state and low resistance state, low resistance state and high resistance state, high resistance state and high resistance state, and high resistance state and low resistance state.
[0195] In some optional embodiments, the initial matching state is that the reluctance states of the two reluctances are respectively a high resistance state and a high resistance state;
[0196] The first storage module 301 includes:
[0197] The fourth determination unit is used to make the magnetic pointer rotate forward one circle to obtain a first magnetic resistance state sequence of the two magnetic resistances, which is high resistance state and high resistance state, low resistance state and high resistance state, low resistance state and low resistance state, high resistance state and low resistance state, and high resistance state and high resistance state.
[0198] The fifth determination unit is used to reverse the magnetic pointer by one circle to obtain a second magnetic resistance state sequence of the two magnetic resistances: high resistance state and high resistance state, high resistance state and low resistance state, low resistance state and low resistance state, low resistance state and high resistance state, and high resistance state and high resistance state.
[0199] In some optional embodiments, the initial matching state is that the reluctance states of the two reluctances are respectively a low resistance state and a high resistance state;
[0200] The first storage module 301 includes:
[0201] The sixth determination unit is used to make the magnetic pointer rotate forward one circle to obtain a first magnetic resistance state sequence of the two magnetic resistances: low resistance state and high resistance state, low resistance state and low resistance state, high resistance state and low resistance state, high resistance state and high resistance state, and low resistance state and high resistance state.
[0202] The seventh determination unit is used to reverse the magnetic pointer by one circle to obtain a second magnetic resistance state sequence of the two magnetic resistances: low resistance state and high resistance state, high resistance state and high resistance state, high resistance state and low resistance state, low resistance state and low resistance state, and low resistance state and high resistance state.
[0203] In some optional embodiments, the initial matching state is that the reluctance states of the two reluctances are respectively a low resistance state and a low resistance state;
[0204] The first storage module 301 includes:
[0205] The eighth determination unit is used to make the magnetic pointer rotate forward one circle to obtain a first magnetic resistance state sequence of the two magnetic resistances, which is low resistance state and low resistance state, high resistance state and low resistance state, high resistance state and high resistance state, low resistance state and high resistance state, and low resistance state and low resistance state.
[0206] The ninth determination unit is used to reverse the magnetic pointer by one circle to obtain a second magnetic resistance state sequence of the two magnetic resistances, which is low resistance state and low resistance state, low resistance state and high resistance state, high resistance state and high resistance state, high resistance state and low resistance state, and low resistance state and low resistance state.
[0207] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0208] The metering device of the dual magnetic resistance water meter in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0209] The embodiment of the present invention also provides a computer device having the above Figure 3 The metering device of the double magnetic resistance water meter shown.
[0210] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 4 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0211] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0212] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0213] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0214] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0215] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0216] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0217] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A measurement method for a double magnetic resistance water meter, characterized in that: The dual magnetic resistance water meter comprises two magnetic resistances and a magnetic pointer, the two magnetic resistances are located in a circle with the magnetic pointer as the center, and the center angle formed by the two magnetic resistances and the magnetic pointer is less than 90 degrees; The method comprises: Based on multiple initial matching states of the two magnetic resistors and the magnetic pointer, the magnetic pointer is rotated forward for one circle, and a first magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored; the magnetic pointer is reversed for one circle, and a second magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, wherein the magnetic resistor state sequence indicates changes in the influence of the magnetic pointer on the magnetic resistor state of the two magnetic resistors during the rotation process, and the magnetic resistor state indicates that the magnetic resistor is in a high resistance state or a low resistance state; When a rising edge or a falling edge is detected in any magnetic resistance, the rotational magnetic resistance states of the two magnetic resistances are stored, and the number of storage times is accumulated; When the number of storage times reaches a preset number, a self-comparison is performed based on the rotational magnetic resistance state of the two magnetic resistances, the first magnetic resistance state sequence, and the second magnetic resistance state sequence to determine the number of forward rotations and the number of reverse rotations of the dual magnetic resistance water meter; Clearing the stored times, returning to the step of storing the rotational magnetic resistance states of the two magnetic resistances and accumulating the stored times when a rising edge or a falling edge is detected at any magnetic resistance, accumulating the forward rotation times and the reverse rotation times until the metering process is completed to obtain the target forward rotation times and the target reverse rotation times; Water consumption is measured based on the target number of forward rotations and the target number of reverse rotations.
2. The method according to claim 1, characterized in that When the number of storage times reaches a preset number, a self-comparison is performed based on the rotational magnetic resistance state of the two magnetic resistances, the first magnetic resistance state sequence, and the second magnetic resistance state sequence to determine the number of forward rotations and the number of reverse rotations of the dual magnetic resistance water meter, including: The preset number of rotational reluctance states are arranged in the order of storage time from earliest to latest to form a target reluctance state sequence; Determining whether the target magnetoresistance state sequence conforms to a first magnetoresistance state sequence or a second magnetoresistance state sequence corresponding to any initial matching state; When the target magnetic resistance state sequence meets the first magnetic resistance state sequence corresponding to any initial matching state, accumulating the number of forward rotations; When the target magnetoresistance state sequence matches a second magnetoresistance state sequence corresponding to any initial matching state, the number of inversions is accumulated.
3. The method according to claim 2, characterized in that After determining whether the target magnetoresistance state sequence conforms to the first magnetoresistance state sequence or the second magnetoresistance state sequence corresponding to any initial matching state, the method further includes: When the target reluctance state sequence does not conform to the first reluctance state sequence or the second reluctance state sequence corresponding to any initial matching state, determining whether there is a rotational reluctance state consistent with the first rotational reluctance state in the target reluctance state sequence; determining a first target position of the rotating reluctance state in the target reluctance state sequence when there is a rotating reluctance state that is consistent with the first rotating reluctance state; retaining the first rotational reluctance state, assigning the rotational reluctance state after the first target position to the rotational reluctance state after the first rotational reluctance state in sequence, and clearing all rotational reluctance states in the target reluctance state sequence except the first rotational reluctance state and the assigned rotational reluctance state; The storage times are modified to the number of rotational reluctance states in the target reluctance state sequence, and the step of returning to the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times when a rising edge or a falling edge is detected in any reluctance is returned.
4. The method according to claim 3, characterized in that After determining whether there is a rotating reluctance state consistent with the first rotating reluctance state in the target reluctance state sequence, the method further includes: When there is no rotational reluctance state that is consistent with the first rotational reluctance state, determining whether there is a rotational reluctance state that is consistent with the second rotational reluctance state in the target reluctance state sequence; determining a second target position of the rotating reluctance state in the target reluctance state sequence when there is a rotating reluctance state that is consistent with the second rotating reluctance state; retaining the first rotational reluctance state and the second rotational reluctance state, sequentially assigning the rotational reluctance state located after the second target position to the rotational reluctance state located after the second rotational reluctance state, and clearing all rotational reluctance states in the target reluctance state sequence except the first rotational reluctance state, the second rotational reluctance state and the assigned rotational reluctance state; The storage times are modified to the number of rotational reluctance states in the target reluctance state sequence, and the step of returning to the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times when a rising edge or a falling edge is detected in any reluctance is returned.
5. The method according to claim 4, characterized in that After determining whether there is a rotational reluctance state consistent with the second rotational reluctance state in the target reluctance state sequence, the method further includes: When there is no rotational reluctance state that is consistent with the second rotational reluctance state, determining whether there is a rotational reluctance state that is consistent with the third rotational reluctance state in the target reluctance state sequence; When there is a rotating reluctance state that is consistent with the third rotating reluctance state, determining a third target position of the rotating reluctance state in the target reluctance state sequence; retaining the first rotational reluctance state, the second rotational reluctance state and the third rotational reluctance state, sequentially assigning the rotational reluctance state located after the third target position to the rotational reluctance state located after the third rotational reluctance state, and clearing all rotational reluctance states in the target reluctance state sequence except the first rotational reluctance state, the second rotational reluctance state, the third rotational reluctance state and the assigned rotational reluctance state; The storage times are modified to the number of rotational reluctance states in the target reluctance state sequence, and the step of returning to the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times when a rising edge or a falling edge is detected in any reluctance is returned.
6. The method according to claim 5, characterized in that After determining whether there is a rotational reluctance state consistent with the third rotational reluctance state in the target reluctance state sequence, the method further includes: When there is no rotational reluctance state that is consistent with the third rotational reluctance state, determining whether there is a rotational reluctance state that is consistent with the fourth rotational reluctance state in the target reluctance state sequence; When there is a rotational reluctance state that is consistent with the fourth rotational reluctance state, retain the first rotational reluctance state, the second rotational reluctance state, the third rotational reluctance state and the fourth rotational reluctance state, and clear the last rotational reluctance state in the target reluctance state sequence; The storage times are modified to the number of rotational reluctance states in the target reluctance state sequence, and the step of returning to the step of storing the rotational reluctance states of the two reluctances and accumulating the storage times when a rising edge or a falling edge is detected in any reluctance is returned.
7. The method according to claim 1, characterized in that The initial matching state is that the reluctance states of the two reluctances are respectively a high resistance state and a low resistance state; Based on the multiple initial matching states of the two magnetic resistors and the magnetic pointer, the magnetic pointer is rotated forward by one circle, a first magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, the magnetic pointer is reversed by one circle, and a second magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, including: The magnetic pointer is rotated forwardly for one circle, and a first magnetic resistance state sequence of the two magnetic resistances is obtained, which is a high resistance state and a low resistance state, a high resistance state and a high resistance state, a low resistance state and a high resistance state, a low resistance state and a low resistance state, and a high resistance state and a low resistance state; The magnetic pointer is reversed for one circle, and a second magnetic resistance state sequence of the two magnetic resistors is obtained, which is a high resistance state and a low resistance state, a low resistance state and a low resistance state, a low resistance state and a high resistance state, a high resistance state and a high resistance state, and a high resistance state and a low resistance state.
8. The method according to claim 1, characterized in that The initial matching state is that the reluctance states of the two reluctances are respectively a high resistance state and a high resistance state; Based on the multiple initial matching states of the two magnetic resistors and the magnetic pointer, the magnetic pointer is rotated forward by one circle, a first magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, the magnetic pointer is reversed by one circle, and a second magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, including: The magnetic pointer is rotated forwardly for one circle, and a first magnetic resistance state sequence of the two magnetic resistances is obtained, which is a high resistance state and a high resistance state, a low resistance state and a high resistance state, a low resistance state and a low resistance state, a high resistance state and a low resistance state, and a high resistance state and a high resistance state; The magnetic pointer is reversed for one circle, and a second magnetic resistance state sequence of the two magnetic resistors is obtained, which is a high resistance state and a high resistance state, a high resistance state and a low resistance state, a low resistance state and a low resistance state, a low resistance state and a high resistance state, and a high resistance state and a high resistance state.
9. The method according to claim 1, characterized in that: The initial matching state is that the reluctance states of the two reluctances are respectively a low resistance state and a high resistance state; Based on the multiple initial matching states of the two magnetic resistors and the magnetic pointer, the magnetic pointer is rotated forward by one circle, a first magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, the magnetic pointer is reversed by one circle, and a second magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, including: The magnetic pointer is rotated forwardly for one circle, and a first magnetic resistance state sequence of the two magnetic resistances is obtained, which is a low resistance state and a high resistance state, a low resistance state and a low resistance state, a high resistance state and a low resistance state, a high resistance state and a high resistance state, and a low resistance state and a high resistance state; The magnetic pointer is reversed for one circle, and a second magnetic resistance state sequence of the two magnetic resistors is obtained, which is low resistance state and high resistance state, high resistance state and high resistance state, high resistance state and low resistance state, low resistance state and low resistance state, and low resistance state and high resistance state.
10. The method according to claim 1, characterized in that The initial matching state is that the reluctance states of the two reluctances are respectively a low resistance state and a low resistance state; Based on the multiple initial matching states of the two magnetic resistors and the magnetic pointer, the magnetic pointer is rotated forward by one circle, a first magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, the magnetic pointer is reversed by one circle, and a second magnetic resistor state sequence corresponding to the two magnetic resistors in different initial matching states is stored, including: The magnetic pointer is rotated forwardly for one circle, and a first magnetic resistance state sequence of the two magnetic resistances is obtained, which is a low resistance state and a low resistance state, a high resistance state and a low resistance state, a high resistance state and a high resistance state, a low resistance state and a high resistance state, and a low resistance state and a low resistance state; The magnetic pointer is reversed for one circle, and a second magnetic resistance state sequence of the two magnetic resistors is obtained, which is low resistance state and low resistance state, low resistance state and high resistance state, high resistance state and high resistance state, high resistance state and low resistance state, and low resistance state and low resistance state.