CN117351604B - Water charging method, water charging device, electronic device and storage medium - Google Patents

Water charging method, water charging device, electronic device and storage medium Download PDF

Info

Publication number
CN117351604B
CN117351604B CN202311181112.7A CN202311181112A CN117351604B CN 117351604 B CN117351604 B CN 117351604B CN 202311181112 A CN202311181112 A CN 202311181112A CN 117351604 B CN117351604 B CN 117351604B
Authority
CN
China
Prior art keywords
water
candidate
water flow
preset
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311181112.7A
Other languages
Chinese (zh)
Other versions
CN117351604A (en
Inventor
蔡元甫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN HEXCELL ELECTRONICS TECHNOLOGY CO LTD
Original Assignee
SHENZHEN HEXCELL ELECTRONICS TECHNOLOGY CO LTD
Filing date
Publication date
Application filed by SHENZHEN HEXCELL ELECTRONICS TECHNOLOGY CO LTD filed Critical SHENZHEN HEXCELL ELECTRONICS TECHNOLOGY CO LTD
Priority to CN202311181112.7A priority Critical patent/CN117351604B/en
Publication of CN117351604A publication Critical patent/CN117351604A/en
Application granted granted Critical
Publication of CN117351604B publication Critical patent/CN117351604B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The application provides a water charging method, a water charging device, electronic equipment and a storage medium, which belong to the technical field of intelligent water meters. And calculating first fitness data according to the initial position, carrying out speed update on the initial water flow speed according to the first fitness data to obtain a candidate water flow speed, and carrying out position update on the initial position to obtain a candidate position. And carrying out neighborhood position search on the water sampling points according to the candidate positions to obtain neighborhood positions. And updating the positions of the neighborhood positions to obtain target positions. And calculating second fitness data according to the target position, and calculating the flow according to the second fitness data and the candidate water flow velocity to obtain the water flow. Abnormal flow removal is carried out on a plurality of water flow obtained in a plurality of preset time periods to obtain target flow, and water charging is carried out according to the target flow, so that the accuracy of water charging can be improved.

Description

Water charging method, water charging device, electronic device and storage medium
Technical Field
The present application relates to the field of intelligent water meter technologies, and in particular, to a water charging method, a water charging device, an electronic device, and a storage medium.
Background
The intelligent water meter has more kinds and can be divided into a water meter remote display system, a water meter remote reading system, an IC intelligent water meter management system, an intelligent security meter reading system and the like. The remote reading system of the water meter is formed by adding a centralized transmission device into a remote display system of the water meter. When a meter reader checks meter, the centralized transmission device is connected with the meter-reading device, and the water meter data of a plurality of households can be completely input into the meter-reading device in a short time. The water meter data stored in the meter reading device is read by the computer, and the water consumption is charged by using the water consumption degree in the water meter data.
In the related art, the water consumption is acquired by adopting a mode of fixing a water flow acquisition point. When the water flow of the fixed water flow collection point has abnormal fluctuation, abnormal charging exists, and the charging is inaccurate when in use. How to realize accurate water charging becomes a problem to be solved urgently.
Disclosure of Invention
The embodiment of the application mainly aims to provide a water charging method, a water charging device, electronic equipment and a storage medium, which aim to improve the accuracy of water charging.
To achieve the above object, a first aspect of an embodiment of the present application provides a water charging method, including:
acquiring an initial position of a water collection point and an initial water flow rate at intervals of a preset time length;
calculating first fitness data of the water collection point according to the initial position;
according to the first fitness data, carrying out speed update on the initial water flow speed to obtain a candidate water flow speed, and carrying out position update on the initial position to obtain a candidate position;
Carrying out neighborhood position search on the water collection points according to the candidate positions to obtain neighborhood positions;
determining a target position of the water collection point according to the neighborhood position;
calculating second fitness data of the water collection point according to the target position;
carrying out flow calculation according to the second fitness data and the candidate water flow velocity to obtain the water flow of the water use collection point;
Abnormal flow removal is carried out on the water flow obtained in the preset time periods to obtain target flow, and water charging is carried out according to the target flow.
In some embodiments, the updating the initial water flow rate according to the first fitness data to obtain a candidate water flow rate, and updating the initial position to obtain a candidate position includes:
if the first adaptation data do not meet the preset termination condition, acquiring the frequency of the sound wave signal sent by the water acquisition point;
The initial water flow rate is updated according to the frequency, the initial position and a preset reference position, and the candidate water flow rate is obtained;
and carrying out position updating on the initial position according to the candidate water flow velocity to obtain the candidate position.
In some embodiments, the performing a neighborhood position search on the water collection point according to the candidate position to obtain a neighborhood position includes:
Acquiring the pulse emissivity of the acoustic wave signals emitted by the water collection point;
And if the preset random number is larger than or equal to the pulse emissivity, searching the neighborhood position of the water collection point according to the candidate position to obtain the neighborhood position.
In some embodiments, the determining the target location of the water collection point according to the neighborhood location includes:
Calculating third fitness data according to the neighborhood position, and calculating fourth fitness data according to the candidate position;
Acquiring the loudness of the sound wave signals transmitted by the water acquisition point;
And if the preset random number is smaller than or equal to the loudness and the third fitness data is smaller than or equal to the fourth fitness data, the neighborhood position is taken as the target position.
In some embodiments, before the initial position of the water collection point and the initial water flow rate are obtained every preset time, the water charging method further includes:
acquiring the gas concentration of a water supply pipeline;
And if the gas concentration is greater than or equal to a preset gas concentration threshold value, supplying water to the water supply pipeline.
In some embodiments, after the calculating the flow rate according to the second fitness data and the candidate water flow rate, the water flow rate of the water use collection point is obtained, the water use charging method further includes:
if the water flow rate is greater than a preset flow rate threshold value, reducing the water flow rate and generating alarm information;
And responding to the operation of the alarm information, and increasing the water flow.
In some embodiments, after the charging for water according to the target flow, the charging method for water further includes:
determining water balance data according to the target flow;
And if the water balance data is greater than or equal to a preset balance threshold value, supplying water to the water supply pipeline.
To achieve the above object, a second aspect of an embodiment of the present application provides a water charging apparatus, including:
The acquisition module is used for acquiring the initial position of the water collection point and the initial water flow velocity at intervals of preset time;
the first calculation module is used for calculating first fitness data of the water collection point according to the initial position;
the first updating module is used for carrying out speed updating on the initial water flow speed according to the first fitness data to obtain a candidate water flow speed, and carrying out position updating on the initial position to obtain a candidate position;
the neighborhood searching module is used for searching the neighborhood position of the water collection point according to the candidate position to obtain a neighborhood position;
The second updating module is used for updating the positions of the neighborhood positions to obtain the target positions of the water collection points;
The second calculation module is used for calculating second fitness data of the water collection point according to the target position;
The third calculation module is used for calculating the flow according to the second fitness data and the candidate water flow velocity to obtain the water flow of the water use collection point;
the water charging module is used for removing abnormal flow of the water flow obtained in the preset time periods to obtain target flow, and charging water according to the target flow.
To achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the water charging method described in the first aspect when executing the computer program.
To achieve the above object, a fourth aspect of the embodiments of the present application proposes a computer-readable storage medium storing a computer program which, when executed by a processor, implements the water charging method described in the first aspect.
According to the water charging method, the water charging device, the electronic equipment and the computer readable storage medium, the initial position and the initial water flow velocity of the water collection point are obtained every preset time, and the water fluidity is collected in a mode of dynamically obtaining the position of the water collection point every preset time, so that the problem of abnormal charging caused by fixed water collection points is solved. And calculating first fitness data of the water collection point according to the initial position, carrying out speed update on the initial water flow speed according to the first fitness data to obtain a candidate water flow speed, and carrying out position update on the initial position to obtain a candidate position so as to determine the optimal water collection point position and the water flow speed at the position. In order to avoid inaccurate positions of the water collection points caused by the fact that the candidate positions are sunk into the local optimal solution, neighborhood position searching is conducted on the water collection points according to the candidate positions, and neighborhood positions are obtained. And determining the target position of the water use acquisition point according to the neighborhood position so as to ensure that the position of the water use acquisition point is a global optimal value. And calculating second fitness data of the water use collection point according to the target position, and calculating the flow according to the second fitness data and the candidate water flow velocity to obtain the water flow of the water use collection point, so as to determine the water use degree of the water use collection point. Abnormal flow removal is carried out on a plurality of water flow obtained in a plurality of preset time periods to obtain target flow, and charging abnormality caused by adopting the abnormal flow is avoided. And the water charging is carried out according to the target flow, and the water charging is carried out through the target flow in the normal flow range, so that the accuracy of the water charging is ensured.
Drawings
FIG. 1 is a flow chart of a water billing method provided by an embodiment of the present application;
FIG. 2 is another flow chart of a water billing method provided by an embodiment of the present application;
fig. 3 is a flowchart of step S130 in fig. 1;
fig. 4 is a flowchart of step S140 in fig. 1;
fig. 5 is a flowchart of step S150 in fig. 1;
FIG. 6 is another flow chart of a water billing method provided by an embodiment of the present application;
FIG. 7 is another flow chart of a water billing method provided by an embodiment of the present application;
fig. 8 is a schematic diagram of a water charging device according to an embodiment of the present application;
fig. 9 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
It should be noted that although functional block division is performed in a device diagram and a logic sequence is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the block division in the device, or in the flowchart. The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the application only and is not intended to be limiting of the application.
The intelligent water meter has more kinds and can be divided into a water meter remote display system, a water meter remote reading system, an IC intelligent water meter management system, an intelligent security meter reading system and the like. The remote reading system of the water meter is formed by adding a centralized transmission device into a remote display system of the water meter. When a meter reader checks meter, the centralized transmission device is connected with the meter-reading device, and the water meter data of a plurality of households can be completely input into the meter-reading device in a short time. The water meter data stored in the meter reading device is read by the computer, and the water consumption is charged by using the water consumption degree in the water meter data.
In the related art, the water consumption is acquired by adopting a mode of fixing a water flow acquisition point. When the water flow of the fixed water flow collection point has abnormal fluctuation, abnormal charging exists, and the charging is inaccurate when in use. How to realize accurate water charging becomes a problem to be solved urgently.
Based on this, the embodiment of the application provides a water charging method, a water charging device, electronic equipment and a computer readable storage medium, aiming at improving the accuracy of water charging.
The water charging method, the water charging device, the electronic equipment and the computer readable storage medium provided by the embodiment of the application are specifically described by the following embodiments, and the water charging method in the embodiment of the application is described first.
The embodiment of the application provides a water charging method, which relates to the technical field of intelligent water meters. The water charging method provided by the embodiment of the application can be applied to the terminal, can be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal may be a smart phone, tablet, notebook, desktop, etc.; the server side can be configured as an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligent platforms and the like; the software may be an application or the like that implements the water charging method, but is not limited to the above form.
The application is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Fig. 1 is an alternative flow chart of a water billing method according to an embodiment of the present application, and the method in fig. 1 may include, but is not limited to, steps S110 to S180.
Step S110, acquiring an initial position of a water collection point and an initial water flow rate every preset time period;
step S120, calculating first fitness data of a water collection point according to an initial position;
Step S130, according to the first fitness data, carrying out speed update on the initial water flow speed to obtain a candidate water flow speed, and carrying out position update on the initial position to obtain a candidate position;
Step S140, searching the neighborhood positions of the water collection points according to the candidate positions to obtain the neighborhood positions;
step S150, determining a target position of the water collection point according to the neighborhood position;
step S160, calculating second fitness data of the water collection point according to the target position;
Step S170, calculating the flow according to the second fitness data and the candidate water flow velocity to obtain the water flow of the water collection point;
Step S180, abnormal flow removal is carried out on a plurality of water flow obtained in a plurality of preset time periods to obtain target flow, and water charging is carried out according to the target flow.
In the steps S110 to S180 shown in the embodiment of the application, the water flow is acquired by a dynamic water flow acquisition point mode, abnormal water flow is removed from a plurality of water flows acquired by a plurality of water flow acquisition points, and the normal water flow is used for charging, so that the problem of abnormal charging caused by abnormal fluctuation of the water flow of the fixed water flow acquisition point is avoided.
Referring to fig. 2, in some embodiments, prior to step S110, the water charging method may include, but is not limited to, steps S210 to S220:
Step S210, acquiring the gas concentration of a water supply pipeline;
step S220, if the gas concentration is greater than or equal to a preset gas concentration threshold, water is supplied to the water supply pipeline.
In step S210 of some embodiments, the water supply pipe, i.e., the water pipe, includes a main line water pipe and a plurality of branch line water pipes. The main water pipe is connected with a plurality of branch water pipes, and the main water pipe is provided with a main water pipe controller. All the branch water pipes connected with the main water pipe are provided with branch water pipe controllers, and the branch water pipe controllers form a branch controller matrix. An AI chip with Istio load distribution function is arranged in the main line water pipe controller, and Istio load technology is adopted to distribute water to the branch line controller matrix. The branch water pipe controller is internally provided with a water flow sensor and a spectrum absorption type optical fiber gas sensor. When the water flow does not overflow the water flow sensor, the spectral absorption type optical fiber gas sensor is adopted to acquire the gas concentration of the branch water pipe.
The spectrum absorption type optical fiber gas sensor is a gas sensor, has high measurement sensitivity, strong anti-interference capability, good gas identification capability, high response speed, high temperature resistance, moisture resistance and long service life, is easy to integrate and form a net, and detects the concentration of gas by detecting the change of transmitted light intensity or reflected light intensity. Each gas molecule has its own absorption spectrum, and only in the part where the light source emission spectrum overlaps with the gas absorption spectrum, the light source will be absorbed by the gas, and the light intensity of the light source will change after absorption. The spectrum absorption type optical fiber gas sensor is manufactured according to the characteristic that light is attenuated by absorbing light by a medium, the light emitted by a light source is sent into a gas chamber by an incident optical fiber, is absorbed by gas introduced into the gas chamber, and is transmitted to a photoelectric detector by an emergent optical fiber to obtain an optical signal. The optical signal is processed, and the gas concentration of the gas to be detected can be obtained by detecting the change of the light intensity before and after ventilation. The gas to be measured may be air. The calculation method of the gas concentration is shown in formula (1).
Wherein C is the gas concentration; i 0 represents the light intensity when monochromatic light with the wavelength lambda is transmitted through the gas chamber without the gas to be detected; i represents the light intensity of monochromatic light with the wavelength lambda when the monochromatic light penetrates through the gas chamber filled with the gas to be detected; l represents the propagation distance of monochromatic light with wavelength lambda in the gas chamber filled with the gas to be measured; alpha λ denotes the absorption coefficient of light through the medium.
In step S220 of some embodiments, if the gas concentration is greater than or equal to the preset gas concentration threshold, it indicates that the branch pipe is abnormal or the branch pipe is idle. In order to determine the state of the branch pipeline, pipeline abnormality detection is carried out on the branch pipeline through the branch pipeline controller, if the pipeline abnormality detection result shows that the pipeline is abnormal, a water supply request instruction is sent to the main pipeline controller, so that the main pipeline controller distributes water flow to the branch pipeline controller, and water is supplied to the branch pipeline at the distributed water flow. If the pipeline abnormality detection result is that the pipeline is abnormal, water is not supplied to the branch water pipe. It will be appreciated that the flow rate of the dispensed water stream may be determined based on the concentration of the gas. For example, a mapping relation between the gas concentration and the water flow rate can be set, and the water flow rate corresponding to the gas concentration is obtained by searching the mapping relation according to the gas concentration.
The above steps S210 to S220 may determine an empty water supply pipe by the gas concentration to supply water to the empty water supply pipe, thereby improving the pipe utilization rate.
In step S110 of some embodiments, the IC intelligent water meter management system is composed of a water meter base table, an electric valve, a microcomputer, a radio frequency IC card unit, a signal acquisition unit, a data storage unit, a display unit, an electronic computer and a corresponding IC card manager, wherein the signal acquisition unit is a water acquisition point. The IC intelligent water meter management system has the working principle that the IC card management machine inputs the data related to the user and the water meter into the IC card, and the data storage unit reads the data on the IC card and checks the data of the IC card according to the pre-stored data. If the data is correct, the electric valve is opened to supply water to the water supply pipeline. The water consumption is acquired by the signal acquisition unit, and the microcomputer automatically calculates water cost according to the water consumption and displays the water cost on the display unit. According to the embodiment of the application, the bat algorithm is adopted to obtain the optimal acquisition result of the signal acquisition unit, so that more intelligent and accurate basic data are provided for water charge collection.
The bat algorithm is an intelligent algorithm which is inspired by bat based on echo information to optimize positioning and can be used for solving the 0-1 planning problem. If the water flow of the branch water pipe exceeds the water flow sensor, the branch water pipe controller acquires the initial position and the initial water flow velocity of the water collection point at intervals of preset time by utilizing a bat algorithm through a sonar return mode, so that the water flow is determined through the initial position and the initial water flow velocity, the problems of short service life and difficult adjustment of the optical gas sensor are solved, and the operation efficiency is improved while the service life of the optical gas sensor is prolonged. The water collection point is a collection unit arranged on the branch water pipe. The initial position is used to represent the initial position of the water collection point. The initial water flow rate is used to represent the distance that the water flow collected by the water collection point at the initial position flows per unit time.
In step S120 of some embodiments, the initial position is input into a preset fitness function to calculate a fitness value of the water collection point, so as to obtain first fitness data. The fitness function is shown in formula (2).
Wherein i represents the ith water collection point of the branch water pipe; n is the total number of water collection points; y i is the initial position of the ith water collection point; is the true reference position of the ith water collection point.
Referring to fig. 3, in some embodiments, step S130 may include, but is not limited to, steps S310 to S330:
step S310, if the first adaptive data does not meet the preset termination condition, acquiring the frequency of the sound wave signal transmitted by the water acquisition point;
Step S320, updating the initial water flow velocity according to the frequency, the initial position and the preset reference position to obtain candidate water flow velocity;
And step S330, carrying out position update on the initial position according to the candidate water flow velocity to obtain a candidate position.
In step S310 of some embodiments, the preset termination condition may be that the first fitness data is minimum, the first fitness data is less than or equal to a preset fitness threshold, and the current iteration number is greater than or equal to an iteration number threshold. If the first adaptive data does not meet the preset termination condition, the initial position is not the optimal position, and the position iteration needs to be continued on the initial position. The acoustic signal is an ultrasonic signal. The bat algorithm simulates a process that the bat searches for a prey by transmitting ultrasonic waves having a certain frequency, pulse emissivity and loudness, and continuously adjusts a flying speed and a flying position according to the returned ultrasonic waves while adjusting parameters of the transmitted ultrasonic waves so as to approach the prey. The upper limit value of the frequency of the emitted sound wave signal is preset as F max, the lower limit value of the frequency of the emitted sound wave signal is preset as F min, and a random number in the range of (0, 1) is generated. Wherein (0, 1) means that the random number is greater than 0 and less than 1. And determining the frequency according to the lower limit value, the upper limit value and the random number to obtain the frequency of the transmitted sound wave signal, wherein the frequency is used for adjusting the searching speed. The definition that the frequency of the ith water collection point transmitting sound wave signal is denoted as F i,Fi is: f i=Fmin+rand(0,1)×(Fmax-Fmin), rand represents a random number.
In step S320 of some embodiments, assuming that the search space of each bat is S-dimensional, the position of the ith bat at the t-th iteration is represented asSpeed is expressed as/>The preset reference position is a globally optimal position solution of the solutions searched by all N bats. And updating the initial water flow rate according to the frequency F i, the initial position and the preset reference position x pbest to obtain candidate water flow rates. Initial position is denoted/> I denotes an i-th water collection point, i=1, 2,..n, j denotes a j-th dimensional spatial position, j=1, 2,..s. The initial position includes s dimensions, each dimension of the initial position being determined from a random number. Specifically, a random number of (0, 1) is generated while traversing each dimension of the initial position. If the random number is greater than or equal to the preset threshold, the value of the dimension is 1, and if the random number is less than the preset threshold, the value of the dimension is 0. The preset threshold may be 0.5.
If the initial position is the position obtained by the ith water use collection point at the t-th iteration, the initial water flow rate is the water flow rate obtained by the ith water use collection point at the t-th iteration, and the candidate water flow rate is the water flow rate obtained by the ith water use collection point at the t+1th iteration. The method of speed update is shown in formula (3).
In step S330 of some embodiments, according to the candidate water flow rateFor initial position/>And performing initial position updating to obtain an initial position, and performing secondary position updating on the initial position to obtain a candidate position.
The method of preliminary location update is shown in equation (4).
Wherein,Representing the primary location.
The method of the re-location update is shown in equation (5).
When updating again, each dimension of the primary position is traversed, and a (0, 1) random number is generated for each dimension. According to the flow rate of the candidate water flowBuilding a preset threshold/>If the random number of a certain dimension is smaller than or equal to a preset threshold value, subtracting the value of the dimension of the primary position from 1 to serve as the value of the dimension of the candidate position. If the random number of a certain dimension is larger than the preset threshold value, the value of the dimension of the primary position is used as the value of the dimension of the candidate position. And until reaching the s-th dimension, obtaining the candidate position.
In some embodiments, if the first adaptation data meets the preset termination condition, outputting the initial position and the initial water flow rate, and directly taking the initial position and the initial water flow rate as the acquisition result to charge for water.
Through the steps S310 to S330, the position of the water collection point and the water flow rate can be updated to obtain the optimal position and the optimal water flow rate, so that the accuracy of water collection is improved, and the accuracy of water charging is improved.
Referring to fig. 4, in some embodiments, step S140 may include, but is not limited to, steps S410 to S420:
Step S410, acquiring pulse emissivity of a sound wave signal transmitted by a water acquisition point;
step S420, if the preset random number is greater than or equal to the pulse emissivity, searching the neighborhood position of the water collection point according to the candidate position to obtain the neighborhood position.
In step S410 of some embodiments, each water collection point has a respective pulse emissivity, and the pulse emissivity of the water collection point to emit the acoustic signal is obtained. The pulse emissivity of the ith water collection point during the t iteration is expressed as
In step S420 of some embodiments, the cellular automaton is a spatially discrete system, and by combining the cellular automaton principle with the bat algorithm, the bat can be enabled to enhance the optimizing process in the individual neighborhood range in the global optimizing process, enrich the diversity of the bat population, and increase the possibility of obtaining the global optimal solution, so that the accurate position of the water collection point can be obtained. In the t-th iteration process, randomly generating a (0, 1) random number, if the random number is greater than or equal to the pulse emissivityInputting the candidate position into a cellular automaton, searching the neighborhood position of the water collection point according to the candidate position by using the cellular automaton, determining the optimal solution in the neighborhood range, and recording the optimal solution in the individual neighborhood to obtain the neighborhood position. The neighborhood position of the ith water collection point candidate position is expressed as/>
If the random number is smaller than the pulse emissivityThen no neighborhood search is performed.
In the steps S410 to S420, the neighborhood search is performed by the cellular automaton, so that the diversity of water collection points is improved, and the bat algorithm is combined with the cellular automaton in the signal collection unit, so that the optimal collection result of the signal collection unit can be obtained, and more intelligent and accurate basic data are provided for water fee collection.
Referring to fig. 5, in some embodiments, step S150 may include, but is not limited to, steps S510 to S530:
step S510, calculating third fitness data according to the neighborhood position, and calculating fourth fitness data according to the candidate position;
Step S520, obtaining the loudness of the sound wave signal transmitted by the water acquisition point;
in step S530, if the preset random number is less than or equal to the loudness and the third fitness data is less than or equal to the fourth fitness data, the neighborhood position is taken as the target position.
In step S510 of some embodiments, the neighborhood position is input to a preset fitness function to perform fitness calculation, so as to obtain third fitness dataInputting the candidate positions into a preset fitness function to perform fitness calculation to obtain fourth fitness data/>The fitness function can refer to step S120, and will not be described here again.
In step S520 of some embodiments, the loudness is the pulse volume of the sound wave signal transmitted with the water acquisition point. Representing loudness asThe meaning is the loudness of the ith water pick-up point during the t-th iteration.
In some embodiments, to enhance local search capability, the search is continued near the population optimal solution x pbest, updating the location of the individual. The update method is shown in formula (6).
X pbest1=xpbest+εAt formula (6)
Where ε is a constant of (0, 1). A t is the average of the loudness of the sound wave signal at all water acquisition point transmissions at the t-th iteration.
In step S530 of some embodiments, the candidate location is updated according to the preset random number, the third fitness data, the fourth fitness data and the neighborhood location, so as to obtain the target location. Specifically, a random number of (0, 1) is randomly generated, if the random number is less than or equal to the loudnessAnd third fitness data/>Less than or equal to the fourth adaptation dataIndicating that the candidate position is not the optimal position and the candidate position needs to be updated, updating the candidate position by using the neighborhood position, and updating the candidate position/>Equal to neighborhood position/>The neighborhood position is taken as the target position. The target position is the position obtained by the t+1st iteration. If the random number is greater than loudness/>Or if the third fitness data is larger than the fourth fitness data, the candidate position is directly used as the target position without updating the candidate position by utilizing the neighborhood position.
The steps S510 to S530 can generate more excellent individuals through continuous iteration to optimize the position of the water collection point, thereby improving the accuracy of water collection.
In step S160 of some embodiments, the target position is input to a preset fitness function to perform fitness calculation, so as to obtain second fitness data of the water collection point.
In step S170 of some embodiments, the number of iterations is stepped up by step 1 to update the number of iterations t. The loudness and the pulse emissivity are updated, the updating method of the loudness is shown in a formula (7), and the updating method of the pulse emissivity is shown in a formula (8).
Wherein α and γ are constants of (0, 1). Alpha, gamma, epsilon and loudnessPulse emissivity/>The bat algorithm is initialized at the beginning.
From equation (7), it can be seen that the loudness of the sound wave signal is continuously reduced with the increase of the iteration number by the water collection point. As can be seen from equation (8), the pulse emissivity of the acoustic signal is emitted by the water collection point, which increases with the number of iterations. This enables a transition from a global search to a local search.
And if the second adaptation data meet the termination condition, carrying out averaging treatment on the candidate water flow velocities corresponding to the N water collection points to obtain a flow velocity average value, and carrying out averaging treatment on the sectional areas of the branch water pipes at the target positions corresponding to the N water collection points to obtain a sectional area average value. And multiplying the average sectional area of the flow velocity by the average sectional area of the flow velocity to obtain the water flow of the branch water pipe.
Or if the second adaptive data meet the termination condition, calculating absolute values of differences between target positions of the N water collection points and the real reference positions, selecting a candidate water flow velocity corresponding to the target position with the smallest absolute value as a target flow velocity, selecting a branch water pipe sectional area corresponding to the target position with the smallest absolute value as a target area, and multiplying the target flow velocity by the target area to obtain the water flow of the branch water pipe.
Referring to fig. 6, in some embodiments, after step S170, the water charging method may further include, but is not limited to, steps S610 to S620:
step S610, if the water flow is greater than the preset flow threshold, the water flow is reduced, and alarm information is generated;
in step S620, the water flow rate is increased in response to the operation of the alarm information.
In step S610 of some embodiments, a Istio load distribution strategy is employed to assist in formulating a water usage strategy for the meter water flow manager during peak water usage periods. In order to avoid the influence of a complicated and tortuous water pipeline on water flow acquisition data, the embodiment of the application further confirms the real requirement of a user on water flow of the water pipe through an alarm strategy. If the intelligent water meter detects that the water flow of a certain branch water pipe is greater than a preset flow threshold, the branch controller matrix transmits the detection result to the main water pipe controller, the main water pipe controller is used for adjusting the working state of the water pipe, the main water pipe controller triggers Istio load distribution to reduce the water flow, alarm information is generated, and the alarm information is displayed through the intelligent water meter display screen to prompt a user. It is understood that the main water pipe controller is a water pipe controller of the main water pipe, and the main water pipe controller switches the working state of the branch water pipe through the branch water pipe controller.
In step S620 of some embodiments, in response to the operation on the alarm information, if the operation indicates that water is normally used, the water flow rate is increased to a first preset threshold value, where the first preset threshold value is greater than the preset flow rate threshold value. If the operation indicates abnormal water consumption, which indicates an abnormal condition that the water pipe is possibly broken, istio load distribution gradually controls and reduces the water flow rate every preset time interval until the water flow rate reaches a second preset threshold value, wherein the second preset threshold value can be 0, and the second preset threshold value is smaller than the preset flow rate threshold value. Therefore, a safe water control mechanism is provided under the conditions of sudden water pipe rupture and other anomalies in the home scene, the practicability of the intelligent water meter is improved, and the accuracy of water flow collection is further improved.
Through the steps S610 to S620, the control of the water flow of the water pipe can be completed through the cooperation of the main water pipe controller and the branch water pipe controller according to the real requirements of the user.
In step S180 of some embodiments, the embodiment of the present application uses a 95 billing algorithm to calculate the water usage. The preset time period can be 5 minutes, one water collection point is taken every 5 minutes, 12 points are taken every hour, and 12×24 points are taken a day. Assuming 30 days for one month, 12×24×30=8640 points can be taken. Sequencing the water flow rates of the water collection points from large to small, taking the water flow rate with the highest value of the first 5% as abnormal flow rate, performing independent charging on the abnormal flow rate to form abnormal charging, providing abnormal charging related information to a user and a water meter operator, and paying the abnormal charging after the user and the water meter operator perform charge confirmation on the abnormal charging. And taking the remaining 95% of water flow as a target flow, and charging the target flow for normal water. It is understood that the water flow with 432 points is in an abnormal flow range, and is used for abnormal billing. The number of points for normal billing is 8208. And multiplying the target flow corresponding to each preset time length by the preset time length, adding the multiplied results, and multiplying the multiplied results by the unit water cost to obtain the water cost. The water cost may be a cost corresponding to a month water availability.
When abnormal fluctuation occurs in the fixed water flow acquisition point, the data acquired by adopting a sonar return mode may inaccurately cause abnormal charging. According to the embodiment of the application, the signal acquisition unit combines the cellular automaton idea with the bat algorithm to obtain the optimal acquisition result of the signal acquisition unit, so that more intelligent and accurate basic data are provided for water charge metering. And adopting a 95 charging algorithm and a bat algorithm to obtain the highest 5% of the value as an abnormal water flow range of the acquisition unit, and carrying out independent charging on the abnormal water flow range to form abnormal charging, and carrying out normal charging on the 95% of non-abnormal water flow range. And providing the abnormal charging related information, and paying after the user confirms the abnormal charging and the water meter operator.
In the face of complicated water pipelines, the related technology mainly relies on water flow sensors to calculate water flow in sections in combination with sonar echo technology. And the flow measurement of the branch water pipes is carried out by respectively installing sensors or echo devices on the plurality of branch water pipes below the main water pipe. And the branch water pipe is not provided with a sensor or an echo device in most cases, so that the flow measurement result is inaccurate. When the branch water pipeline is more and the line is complex, the position installation of the sensor or the echo device is compact, repeated metering is easy to generate in the calculation of the branch water pipeline flow under the main water pipeline, and the accuracy of the branch water pipeline metering is also affected. In order to avoid the situation that a water meter is 5% abnormal in charging caused by the fact that a complex and tortuous water pipeline delays in collecting water flow sonar echoes by a bat algorithm, a main water pipe controller is arranged on a main water pipe, a chip with Istio load distribution function is deployed, and all branch water pipes connected with the main water pipe controller are provided with branch water pipe controllers to form a branch water pipe controller matrix. Each branch water pipe managed by each branch water pipe controller in the branch controller matrix shares one sidecar service, each sidecar service is uniformly matched with a bat algorithm and is calculated independently, and a calculation result is transmitted to the branch water pipe controller of the branch controller matrix through sidecar service. By combining Istio load technology on the basis of measuring the sonar echo of the water pipe by using the bat algorithm, the situation that repeated measurement is easy to generate in the calculation of the water flow of the water pipe under the main water pipe and the branch water pipe is avoided.
Referring to fig. 7, in some embodiments, after step S180, the water charging method may further include, but is not limited to, steps S710 to S720:
Step S710, determining water balance data according to the target flow;
And step S720, if the water balance data is greater than or equal to a preset balance threshold value, supplying water to the water supply pipeline.
In step S710 of some embodiments, the target flow corresponding to each preset duration is multiplied by the preset duration according to the 95 charging method, and the multiplied results are added to obtain the first water mobility. And multiplying the abnormal flow by the preset duration, and adding the multiplied results to obtain the second water fluidity. And if the second water consumption is confirmed and paid by the user, adding the first water consumption and the second water consumption to obtain the target water consumption. And if the second water consumption is confirmed by the user and payment is not needed, taking the first water consumption as the target water consumption. And subtracting the total water consumption purchased by the user from the target water consumption to obtain the water purchase balance, wherein the water purchase balance is the water use balance data. The water balance data is automatically calculated by the microcomputer and displayed on the display unit.
In step S720 of some embodiments, if the balance data of the user is greater than or equal to the preset balance threshold, the electric valve is opened to supply water to the water supply pipeline. The preset balance threshold value can be set by a microcomputer. If the water balance data of the user is less than the preset balance threshold value, automatically stopping water through the electric valve. After the user purchases water again, the IC card data is input into the data storage unit, and the electric valve opens the water supply again.
Through the steps S710 to S720, water supply can be controlled, and the practicability of the intelligent water meter is improved.
Referring to fig. 8, an embodiment of the present application further provides a water charging device, which can implement the above water charging method, where the device includes:
the acquiring module 810 is configured to acquire an initial position of a water sampling point and an initial water flow rate at intervals of a preset duration;
a first calculation module 820 for calculating first fitness data of the water collection point according to the initial position;
The first updating module 830 is configured to update the initial water flow velocity according to the first fitness data to obtain a candidate water flow velocity, and update the initial position to obtain a candidate position;
A neighborhood searching module 840, configured to search the neighborhood positions of the water-using acquisition points according to the candidate positions to obtain neighborhood positions;
A second update module 850 for determining a target location of the water collection point according to the neighborhood location;
a second calculation module 860 for calculating second fitness data of the water collection point according to the target position;
A third calculation module 870, configured to perform flow calculation according to the second fitness data and the candidate water flow velocity, to obtain a water flow of the water use collection point;
The water charging module 880 is configured to perform abnormal flow removal on a plurality of water flows acquired in a plurality of preset durations, obtain a target flow, and perform water charging according to the target flow.
The specific implementation of the water charging device is basically the same as the specific embodiment of the water charging method, and will not be described herein.
The embodiment of the application also provides electronic equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the water charging method when executing the computer program. The electronic equipment can be any intelligent terminal including a tablet personal computer, a vehicle-mounted computer and the like.
Referring to fig. 9, fig. 9 illustrates a hardware structure of an electronic device according to another embodiment, the electronic device includes:
The processor 910 may be implemented by a general-purpose CPU (central processing unit), a microprocessor, an application-specific integrated circuit (ApplicationSpecificIntegratedCircuit, ASIC), or one or more integrated circuits, etc. for executing related programs to implement the technical solutions provided by the embodiments of the present application;
Memory 920 may be implemented in the form of read-only memory (ReadOnlyMemory, ROM), static storage, dynamic storage, or random access memory (RandomAccessMemory, RAM). Memory 920 may store an operating system and other application programs, and when implementing the technical solutions provided in the embodiments of the present disclosure by software or firmware, relevant program codes are stored in memory 920 and invoked by processor 910 to perform the water charging method of the embodiments of the present disclosure;
An input/output interface 930 for inputting and outputting information;
The communication interface 940 is configured to implement communication interaction between the device and other devices, and may implement communication in a wired manner (e.g., USB, network cable, etc.), or may implement communication in a wireless manner (e.g., mobile network, WIFI, bluetooth, etc.);
A bus 950 for transferring information between components of the device (e.g., processor 910, memory 920, input/output interface 930, and communication interface 940);
Wherein processor 910, memory 920, input/output interface 930, and communication interface 940 implement communication connections among each other within the device via a bus 950.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the water charging method when being executed by a processor.
The memory, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The water flow rate collection is carried out by a dynamic water flow collection point mode, abnormal water flow rates are removed from a plurality of water flow rates collected by a plurality of water flow collection points, normal water flow rates are utilized for charging, and the problem of abnormal charging caused by abnormal fluctuation of water flow of a fixed water flow collection point is avoided.
The embodiments described in the embodiments of the present application are for more clearly describing the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application, and those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
It will be appreciated by persons skilled in the art that the embodiments of the application are not limited by the illustrations, and that more or fewer steps than those shown may be included, or certain steps may be combined, or different steps may be included.
The above described apparatus embodiments are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Those of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like in the description of the application and in the above figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "and/or" for describing the association relationship of the association object, the representation may have three relationships, for example, "a and/or B" may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the above-described division of units is merely a logical function division, and there may be another division manner in actual implementation, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including multiple instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method of the various embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a magnetic disk, or an optical disk, or other various media capable of storing a program.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and are not thereby limiting the scope of the claims of the embodiments of the present application. Any modifications, equivalent substitutions and improvements made by those skilled in the art without departing from the scope and spirit of the embodiments of the present application shall fall within the scope of the claims of the embodiments of the present application.

Claims (9)

1. A method for billing water, the method comprising:
acquiring an initial position of a water collection point and an initial water flow rate at intervals of a preset time length;
inputting the initial position into a preset fitness function to calculate first fitness data of the water collection point;
according to the first fitness data, carrying out speed update on the initial water flow speed to obtain a candidate water flow speed, and carrying out position update on the initial position to obtain a candidate position;
Carrying out neighborhood position search on the water collection points according to the candidate positions to obtain neighborhood positions;
determining a target position of the water collection point according to the neighborhood position;
Inputting the target position into the preset fitness function to calculate second fitness data of the water collection point; the preset fitness function is expressed as:
wherein i represents the ith water collection point of the branch water pipe; n is the total number of water collection points; y i is the initial position or target position of the ith water collection point; the true reference position of the ith water collection point;
carrying out flow calculation according to the second fitness data and the candidate water flow velocity to obtain the water flow of the water use collection point;
abnormal flow removal is carried out on the water flow obtained in the preset time periods to obtain target flow, and water charging is carried out according to the target flow;
and according to the first fitness data, performing speed update on the initial water flow speed to obtain a candidate water flow speed, and performing position update on the initial position to obtain a candidate position, including:
If the first adaptation data do not meet the preset termination condition, acquiring the frequency of the sound wave signal sent by the water acquisition point; the preset termination condition comprises that the first fitness data is minimum, and the first fitness data is smaller than or equal to a preset fitness threshold value;
The initial water flow rate is updated according to the frequency, the initial position and a preset reference position, and the candidate water flow rate is obtained; the method for updating the speed is expressed as follows:
Wherein, Candidate water flow rates obtained by the ith water collection point at the t+1st iteration; /(I)The initial water flow velocity obtained by the ith water collection point at the t-th iteration is used; /(I)The initial position of the ith water collection point obtained by the t iteration is obtained; x pbest is a preset reference position; f i denotes the frequency of the i-th transmitted sound wave signal transmitted by the water acquisition point, F i=Fmin+rand(0,1)×(Fmax-Fmin),Fmin is a preset lower limit value of the frequency of the transmitted sound wave signal, rand denotes a random number, (0, 1) denotes that the random number is more than 0 and less than 1, and F max is a preset upper limit value of the frequency of the transmitted sound wave signal;
performing primary position updating on the initial position according to the candidate water flow velocity to obtain a primary position, and performing secondary position updating on the primary position to obtain a candidate position; the method of preliminary location update is expressed as:
Wherein, Representing the primary location;
The method of the re-location update is expressed as:
Where j represents the j-th dimension of the primary location; A preset threshold value;
And performing flow calculation according to the second fitness data and the candidate water flow velocity to obtain the water flow of the water collection point, including:
If the second adaptation data meet the termination condition, carrying out averaging treatment on the candidate water flow rates of the N water collection points to obtain a flow rate average value, carrying out averaging treatment on the sectional areas of the branch water pipes at the target positions of the N water collection points to obtain a sectional area average value, and multiplying the flow rate average value by the sectional area average value to obtain the water flow rate;
Or alternatively
If the second adaptive data meet the termination condition, calculating absolute values of differences between target positions of the N water collection points and the real reference positions, selecting a candidate water flow velocity corresponding to the target position with the smallest absolute value as a target flow velocity, selecting a branch water pipe sectional area corresponding to the target position with the smallest absolute value as a target area, and multiplying the target flow velocity by the target area to obtain the water flow.
2. The method for charging water according to claim 1, wherein the performing a neighborhood location search on the water collection point according to the candidate location to obtain a neighborhood location includes:
Acquiring the pulse emissivity of the acoustic wave signals emitted by the water collection point;
And if the preset random number is larger than or equal to the pulse emissivity, searching the neighborhood position of the water collection point according to the candidate position to obtain the neighborhood position.
3. The water charging method of claim 1, wherein said determining a target location of the water collection point from the neighborhood location comprises:
Calculating third fitness data according to the neighborhood position, and calculating fourth fitness data according to the candidate position;
Acquiring the loudness of the sound wave signals transmitted by the water acquisition point;
And if the preset random number is smaller than or equal to the loudness and the third fitness data is smaller than or equal to the fourth fitness data, the neighborhood position is taken as the target position.
4. The water billing method of claim 1 wherein prior to the acquiring the initial position of the water collection point and the initial water flow rate every preset time period, the water billing method further comprises:
acquiring the gas concentration of a water supply pipeline;
And if the gas concentration is greater than or equal to a preset gas concentration threshold value, supplying water to the water supply pipeline.
5. The water charging method according to any one of claims 1 to 4, wherein after the flow calculation is performed based on the second fitness data and the candidate water flow rate, the water charging method further comprises:
if the water flow rate is greater than a preset flow rate threshold value, reducing the water flow rate and generating alarm information;
And responding to the operation of the alarm information, and increasing the water flow.
6. The water charging method according to any one of claims 1 to 4, characterized in that after the water charging according to the target flow rate, the water charging method further comprises:
determining water balance data according to the target flow;
And if the water balance data is greater than or equal to a preset balance threshold value, supplying water to the water supply pipeline.
7. A water billing device, the device comprising:
The acquisition module is used for acquiring the initial position of the water collection point and the initial water flow velocity at intervals of preset time;
The first calculation module is used for inputting the initial position into a preset fitness function to calculate first fitness data of the water collection point;
the first updating module is used for carrying out speed updating on the initial water flow speed according to the first fitness data to obtain a candidate water flow speed, and carrying out position updating on the initial position to obtain a candidate position;
the neighborhood searching module is used for searching the neighborhood position of the water collection point according to the candidate position to obtain a neighborhood position;
The second updating module is used for updating the positions of the neighborhood positions to obtain the target positions of the water collection points;
the second calculation module is used for inputting the target position into the preset fitness function to calculate second fitness data of the water collection point; the preset fitness function is expressed as:
wherein i represents the ith water collection point of the branch water pipe; n is the total number of water collection points; y i is the initial position or target position of the ith water collection point; the true reference position of the ith water collection point;
The third calculation module is used for calculating the flow according to the second fitness data and the candidate water flow velocity to obtain the water flow of the water use collection point;
The water charging module is used for removing abnormal flow of the water flow obtained in the preset time periods to obtain target flow, and charging water according to the target flow;
and according to the first fitness data, performing speed update on the initial water flow speed to obtain a candidate water flow speed, and performing position update on the initial position to obtain a candidate position, including:
If the first adaptation data do not meet the preset termination condition, acquiring the frequency of the sound wave signal sent by the water acquisition point; the preset termination condition comprises that the first fitness data is minimum, and the first fitness data is smaller than or equal to a preset fitness threshold value;
The initial water flow rate is updated according to the frequency, the initial position and a preset reference position, and the candidate water flow rate is obtained; the method for updating the speed is expressed as follows:
Wherein, Candidate water flow rates obtained by the ith water collection point at the t+1st iteration; /(I)The initial water flow velocity obtained by the ith water collection point at the t-th iteration is used; /(I)The initial position of the ith water collection point obtained by the t iteration is obtained; x pbest is a preset reference position; f i denotes the frequency of the i-th transmitted sound wave signal transmitted by the water acquisition point, F i=Fmin+rand(0,1)×(Fmax-Fmin),Fmin is a preset lower limit value of the frequency of the transmitted sound wave signal, rand denotes a random number, (0, 1) denotes that the random number is more than 0 and less than 1, and F max is a preset upper limit value of the frequency of the transmitted sound wave signal;
performing primary position updating on the initial position according to the candidate water flow velocity to obtain a primary position, and performing secondary position updating on the primary position to obtain a candidate position; the method of preliminary location update is expressed as:
Wherein, Representing the primary location;
The method of the re-location update is expressed as:
Where j represents the j-th dimension of the primary location; A preset threshold value;
And performing flow calculation according to the second fitness data and the candidate water flow velocity to obtain the water flow of the water collection point, including:
If the second adaptation data meet the termination condition, carrying out averaging treatment on the candidate water flow rates of the N water collection points to obtain a flow rate average value, carrying out averaging treatment on the sectional areas of the branch water pipes at the target positions of the N water collection points to obtain a sectional area average value, and multiplying the flow rate average value by the sectional area average value to obtain the water flow rate;
Or alternatively
If the second adaptive data meet the termination condition, calculating absolute values of differences between target positions of the N water collection points and the real reference positions, selecting a candidate water flow velocity corresponding to the target position with the smallest absolute value as a target flow velocity, selecting a branch water pipe sectional area corresponding to the target position with the smallest absolute value as a target area, and multiplying the target flow velocity by the target area to obtain the water flow.
8. An electronic device, characterized in that the electronic device comprises a memory and a processor, the memory storing a computer program, the processor implementing the water charging method according to any of claims 1 to 6 when executing the computer program.
9. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the water charging method of any one of claims 1 to 6.
CN202311181112.7A 2023-09-13 Water charging method, water charging device, electronic device and storage medium Active CN117351604B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311181112.7A CN117351604B (en) 2023-09-13 Water charging method, water charging device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311181112.7A CN117351604B (en) 2023-09-13 Water charging method, water charging device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN117351604A CN117351604A (en) 2024-01-05
CN117351604B true CN117351604B (en) 2024-06-04

Family

ID=

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008082799A (en) * 2006-09-27 2008-04-10 Matsushita Electric Ind Co Ltd Flow measuring instrument, flow measuring system, and program for flow measuring instrument
JP2010282449A (en) * 2009-06-05 2010-12-16 Toyo Keiki Co Ltd Prepaid-system gas supply control method and gas supply control system, and gas residual amount display device
CN109242349A (en) * 2018-10-17 2019-01-18 合肥思博特软件开发有限公司 A kind of water-flow control method and system based on user demand
CN115913763A (en) * 2022-12-13 2023-04-04 天翼物联科技有限公司 Flow abnormity detection method, device, equipment and medium
CN115909600A (en) * 2023-01-09 2023-04-04 杭州青橄榄物联科技有限公司 Hot water shower charging display and accounting equipment applied to digital campus
CN116739202A (en) * 2023-08-15 2023-09-12 深圳华越南方电子技术有限公司 Power routing method, system, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008082799A (en) * 2006-09-27 2008-04-10 Matsushita Electric Ind Co Ltd Flow measuring instrument, flow measuring system, and program for flow measuring instrument
CN201066289Y (en) * 2006-09-27 2008-05-28 松下电器产业株式会社 Flux measuring device and flux measuring system
JP2010282449A (en) * 2009-06-05 2010-12-16 Toyo Keiki Co Ltd Prepaid-system gas supply control method and gas supply control system, and gas residual amount display device
CN109242349A (en) * 2018-10-17 2019-01-18 合肥思博特软件开发有限公司 A kind of water-flow control method and system based on user demand
CN115913763A (en) * 2022-12-13 2023-04-04 天翼物联科技有限公司 Flow abnormity detection method, device, equipment and medium
CN115909600A (en) * 2023-01-09 2023-04-04 杭州青橄榄物联科技有限公司 Hot water shower charging display and accounting equipment applied to digital campus
CN116739202A (en) * 2023-08-15 2023-09-12 深圳华越南方电子技术有限公司 Power routing method, system, equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
刘鑫 ; 杨霄鹏 ; 姚昆 ; 苏子萱 ; 张衡阳.自适应随机优化策略的改进人工蜂群算法.小型微型计算机系统.2018,(002),全文. *
基于粒子群算法的给水管网优化设计;王玉芳;柴伟;乔俊飞;;计算机测量与控制;20110225(02);全文 *
王玉芳 ; 柴伟 ; 乔俊飞 ; .基于粒子群算法的给水管网优化设计.计算机测量与控制.2011,(02),全文. *
自适应随机优化策略的改进人工蜂群算法;刘鑫;杨霄鹏;姚昆;苏子萱;张衡阳;小型微型计算机系统;20181231(002);全文 *

Similar Documents

Publication Publication Date Title
US20130116952A1 (en) Power metering system and a method of displaying reading derived from the same
US11328230B2 (en) Multinodal power sensing, aggregation, and transmission
KR100809650B1 (en) a Telemetering System of Water Guage Based on communications network
AU2021105436A4 (en) Device and system for power consumption monitoring and management
US8346713B2 (en) Method and system for recognizing power consumption behaviors of electric appliances in a loop
Zhang et al. Weighted adaptive KNN algorithm with historical information fusion for fingerprint positioning
CN109492836A (en) Load forecast and Research on electricity price prediction system based on shot and long term memory network
US10473702B2 (en) Estimating operation state of individual load
CN108876249A (en) Goods monitoring system and method
KR20170073303A (en) Parking management method using the vehicle detection sensor And System there-of
KR101225074B1 (en) Monitoring system comparing power consumption and method thereof
CN117351604B (en) Water charging method, water charging device, electronic device and storage medium
CN105044659A (en) Indoor positioning device based on environment spectrum fingerprint
US11263684B2 (en) Product recommendation method and product recommendation device
JP2002354560A (en) System for managing energy supply
CN117351604A (en) Water charging method, water charging device, electronic device and storage medium
CN116704716A (en) Laboratory constant temperature and humidity abnormality alarm method and device and computer equipment
CN116070795A (en) Intelligent energy management and control method and system based on Internet of things
WO2018185454A1 (en) Energy management system and method of use thereof
US10338624B2 (en) System and method for monitoring and reducing energy usage in the home
KR101867222B1 (en) Non-Intrusive Appliance Load Monitoring Method and Device using Influence of Complex Sensors on State of Appliance
KR102294533B1 (en) Method for providing reward about sharing environmental information and environmental information management server
CN112785759A (en) System and method for passenger flow statistics
CN106157342B (en) The automatic calibration method and system of signal map
CN107144730B (en) Power consumption prediction system for electric equipment

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant